Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Android app won't launch unless project dir name equals app name

When testing my code, sometimes it is useful to make a copy of the project in a temporary directory and run a second instance from there. For example,
cp -R appname appname-temp

However, the titanium build path seems to require that the project is located in a directory named after the application, otherwise the app won't launch in the android emulator (regardless of whether the original copy is running in the emu). The following errors are output by tidev, when launching app located at /path/to/appname-temp:

[ERROR] /opt/android-sdk-linux_86/tools/apkbuilder /path/to/appname/build/android/src does not exist!
[ERROR] /opt/android-sdk-linux_86/tools/zipalign Unable to open '/path/to/appname/build/android/bin/app.apk' as zip archive

In this situation, TiDev attempts to build some of the files in a directory at /path/to/appname-temp/ and some of the files outside the project directory at /path/to/appname.

Unless there is some reason for this behaviour, I feel it is a bug.

Would someone help me to understand this?

Many thanks in advance

— asked June 1st 2010 by Paul Dowsett
  • android
  • emulator

2 Answers

  • Accepted Answer

    It is a bug Ticket 48 seems similar to your problem.

    The quick workaround is to create a new project and then only copy the Resources folder or symlink the Resources folder between the two different projects.

    — answered June 1st 2010 by Don Thorp
  • Hi again, Don - thank you for your response.
    My apologies, but I don't quite understand your suggestion. If I symlink the resources folder, then surely modifying the code will change the original copy's code, which defeats the objective of copying to a second project directory. I am sure this can't be what you mean, so would you kindly clarify?

    Do you know if there is a timescale for fixing this? What is the typical turnaround for bugs found in tidev, as a general rule?

    Kind regards

    — answered June 1st 2010 by Paul Dowsett
    • I couldn't tell if you were trying to use two emulators with the same codebase or separate. My suggestion only works if you wanted identical. In either case you need to just copy the Resources and not the rest of the project structure.

      I would not count on the issue getting fixed in Developer anytime soon.

      Notice we've added comments to Q&A so you no longer have to clutter up the system with answers that are just discussion. It's a big help.

      — commented June 1st 2010 by Don Thorp
    • OK, thank you Don. I will check your solution tomorrow, and mark your answer here if the problem is resolved.

      — commented June 1st 2010 by Paul Dowsett
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.