1) Create an Android project and run it in the emulator.
2) After the project has successfully installed on the emulator, close the emulator.
3) Clean the project (either through Project -> Clean... or by deleting the build files manually in the project file: Titanium Studio Workspace\
\build\android\)
4) Run the project in the emulator again
Expected: Project installs normally and autolaunches in emulator
Actual: Project never reinstalls in emulator. If you look in Debug perspective, the Application Installer exit value is 1 instead of the expected 0
Notes:
- Happens regardless of Fastdev being on or off.
- Reproducible in build 1.0.2.201107130739
Workaround:
Exit and relaunch TiStudio. Application will now properly install on emulator.
Max, thoughts? Might be for Marshall.
probably ours since TiStudio restart resolves. will try to reproduce
The issue here is that FastDev server is running when users cleans the project. The right approach would be to terminate FastDev server when Clean action is triggered. Workaround: open Debug view, select FastDev server for the project and click Terminate button.
Should have added this in the steps, but the original problem still occurred when we terminated the Fastdev server in Debug View and pressed Remove all Terminated Launches. We did this before we cleaned the project build.
NPE found in attached log is fixed.
Application Installer console output:
Hi Alan, Does the workaround you mentioned "Exit and relaunch TiStudio. Application will now properly install on emulator." really work for you ? Once I reproduced the issue, I could not get rid of it even after restart. Even more: the error does not go any even after TiSDK change from 1.7.1 to 1.7.2
Marshall, ideas ?
Hi Max, Interesting, I went through the steps again and the application successfully installs after I close the emulator and studio, relaunch studio, and rerun the application on the emulator. I never changed SDK versions though. I was always using SDK 1.7.2.
Alan, Marshall, this is definitely TiSDK issue. The reason why TiStudio restart helps is because tiapp.xml timestamp changes on restart. probably by project builder on start.
Move this into 1.1
Hey Max, I took a look at the code where this error occurs, and it looks like we're already preemptively creating the
build/android/bin/assets/Resources
directory just a few lines above. Is the "Clean" process implemented in TiStudio happening asynchronously somehow, causing the folder to get deleted behind the script after it's created?Nope. I reproduced this sitting with Alan side-by-side. It has nothing to do with Clean process. Deleting build/android folder via Windows explorer has the same effect. Basically the issue is: only touching tiapp.xml forces full rebuild.
Have you been able to reproduce this anywhere besides Windows? I've deleted the build/android folder several times in a row without touching tiapp.xml, and I'm not seeing any builder.py errors here.
Yep, I got my output above from OSX. One thing we noticed on the build output is that only full rebuild log contains something like "Copying Resources/android/appicon.png to build/android/bin/assets/Resources/appicon.png" and same message for default.png. The other build after removing build/android did not contain these messages.
See the community ticket - http://developer.appcelerator.com/question/123898/android-gives-error-on-file-readtext "I have the same problem. After downloading and using mobile sdk build mobilesdk-1.7.3.v20110826161351 fromhttp://builds.appcelerator.com.s3.amazonaws.com/index.html, the problem is resolved. I'm running Mac OS X."
Duplicate of TIMOB-5040