Software Archive
Read-only legacy content
17060 Discussions

1816 Can't switch projects.

Marc_S_
Beginner
2,633 Views

After updating to 1816, XDK does not allow me to switch projects without having to quit. Also, I have to force quit. Normal quit does not work.

Thanks.

Marc

0 Kudos
16 Replies
Anusha_M_Intel1
Employee
2,633 Views

I think completely uninstalling the XDK and re-installing version 1816 of the XDK would help in this case. You can check out this post for detailed instructions on how to do so: https://software.intel.com/en-us/forums/topic/542074

Anusha

0 Kudos
Swati_S_Intel1
Employee
2,633 Views

Are you on Mac or Windows? 

0 Kudos
Marc_S_
Beginner
2,633 Views

Mac - Yosemite

0 Kudos
John_H_Intel2
Employee
2,633 Views

Did you have this problem on the previous release (1621) ?

Do you have the ability to try installing on a second computer?
Is this a personal or work computer? Company computers can sometimes have software installed that interferes with the XDK.

0 Kudos
Marc_S_
Beginner
2,633 Views

I did not have this problem with 1621. I can install on a windows VM. I use this computer for work, but it doesn't have any software that I can't control.

0 Kudos
Marc_S_
Beginner
2,633 Views

I uninstalled and reinstalled XDK. I can now switch between projects, but if I switch source directories for a project I have to quit and reopen XDK for the app to work in the Emulator. Attached is a screen grab of the error ('XDK can't find your app') I get. And yes, the index.html file does exist.

0 Kudos
Swati_S_Intel1
Employee
2,633 Views

Your source directory is the www directory in your project folder. Make sure your index.html file is in the project source directory i.e. www  and one level above www is the location of .xdk project file.

If you switch the project to use another source directory or do not follow the structure above then XDK won't be able to find index.html.

Swati

0 Kudos
Marc_S_
Beginner
2,633 Views

SWATI S. (Intel) wrote:

If you switch the project to use another source directory or do not follow the structure above then XDK won't be able to find index.html.

Are you saying if I change the source directory of a project, XDK won't be able to find the index.html that definitely exists? I had no problems doing this in previous versions.

0 Kudos
Swati_S_Intel1
Employee
2,633 Views

I don't know what you mean by changing source directory of a project.

XDK looks for index.html file in www directory of your project folder. If it's not there you will get the 404 error.

Swati

0 Kudos
Marc_S_
Beginner
2,633 Views

In the settings page. See attached.

0 Kudos
Marc_S_
Beginner
2,633 Views

So I guess we can consider this a bug. It's still happening in 1826. How do I go about submitting a bug?

 

0 Kudos
PaulF_IntelCorp
Employee
2,633 Views

Are you saying that your project directory contains multiple "source directories" -- each with a unique index.html file? If that is what you are doing, that will confuse the XDK. It is not designed to work with such a situation. If it worked in the past it was pure luck. The "source directory" in the project settings is there so you can customize the location of your index.html file so you don't have to use the default value of "www" but it is not there to change as part of using your project.

Can you provide a detailed step-by-step describing what you are doing to create this issue?

0 Kudos
Marc_S_
Beginner
2,633 Views

I DMed you. 

During the development phase of project this is not really an issue. But when we move to QA, this becomes a pain point. I make a change in the app directory, test, create a release build, then change the source directory to www to confirm the change and build the app. I understand this is not a typical workflow for Cordova apps, but I prefer to minify and optimize my apps before packaging them. So having two working directories is a necessity. 

Thanks.

 

0 Kudos
PaulF_IntelCorp
Employee
2,633 Views

Hi Marc, thanks for the video, I'm filing a bug report. It looks like this is related to some other issues I've encountered where properties on the Projects tab are not getting saved out properly and are impacting other parts of the XDK. What you are attempting to do is perfectly reasonable and should work.

0 Kudos
Marc_S_
Beginner
2,633 Views

Thanks, Paul.

In case some more info on my environment may help, we are using TFS as our source control. And I do make sure to have the .xdk and xdke files checked out when working on a project.

0 Kudos
Julian_H_Intel
Employee
2,633 Views

Hi Marc,

I have diagnosed your problem, and it is indeed a bug in the XDK.

To emulate a Cordova project, the source must be "prepared".  This step combines your project sources with the sources for the selected plugins and produces what is essential a copy of your project, specialized as appropriate. This copy only includes project source files below the source directory for your project.

The bug is that the "prepare" step always uses the same value for the source directory, even if you change it in the project settings.  That's why the emulator can't find your index.html file after you changed the source directory. The emulator is looking for the correct file, but it didn't get included in the copy because the "prepare" was done with the wrong source directory value.

You can work around the bug by changing projects (and then changing back) after each time you change the project source directory.  I appreciate that this is inconvenient, but this is the best we can do until the bug is fixed.

    Julian

0 Kudos
Reply