Errors while building a Titanium project are usually due to configuration issues. The most common problems and possible solutions are posted here.
Run/Debug icons are greyed out
This occurs when a project isn't recognized as a Titanium project. You can check whether the project has the correct type by looking at the project folder in the Navigator or Project Explorer view. If the type is set correctly, the folder should have an "M" icon (for Mobile) or a "D" icon (for Desktop). If the icon is missing, the project type is set incorrectly.
- Follow the steps in Changing Your Project Type, choosing the settings for Titanium Mobile or Titanium Desktop.
- After changing the project type, you may need to restart Studio.
Build error in console output
Sometimes your project fails to build, but it's not clear if it's an issue with Studio, or perhaps there is a bug in the SDK. To isolate this problem, you can try building from the command line using the exact same parameters as Studio.
- Open the Studio Preferences dialog and navigate to Studio > Troubleshooting.
- Push the slider all the way to the right to "All"
- Check on "debug specific components"
- Check on "com.aptana.core/debug/shell"
- Save and exit the preference menu
- Re-run the build. View the Studio log file (Help > Studio > View Log file)
You should see an entry like:
- Open a terminal window and paste in the first line (the whole line, starting with the reference to Python), as shown below:
Does the process give the same error?
Build error: No such file or directory
This can be caused by a few different issues:
- You are running an incompatible version of XCode. Upgrade to the latest version.
- You have not correctly installed the Java JDK.
Build Error: iOS Module: No module named tools
When building an iOS module, you may run into the following error:
There are two possible fixes.
- Check your module.xcconfig. It may be that TITANIUM_SDK_VERSION and TITANIUM_SDK point to the wrong version or location.
- Create a new project and copy over the build.py from that new project to yours. It could be your build script is out of date.
Install Error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
When launching an Android application on the emulator, you may run into the following error:
There are a few possible fixes.
- Check that your launch configuration uses the 'Google APIs' Android version (e.g. 'Google APIs Android 2.2').
- Kill the emulator (adb) process, and relaunch the application through your launch-configurations.
Xcode not installed
Studio reports that Xcode is not installed, even though you believe it is. This appears to be caused by a bad install of Xcode. Uninstalling and re-installing Xcode has fixed the issue in every case so far.
You can double check the install location of Xcode by typing the following in Terminal:
Which should print something like '/Developer'
The directory ... contains 2 projects
This can happen when renaming an application. To fix this, delete the contents of build/iphone and re-build.