Search code examples
androidtitaniumtitanium-mobiletitanium-alloy

How to change the behavior of the Titanium Studio IDE when compiling?


Titanium Studio is acting weird. When ever I try to compile and run the project, it stops and fails at installing the app. It gives this error when doing so:

[ERROR] :  Failed to package application:
[ERROR] :  
[ERROR] :  res/drawable/Icon.png: Invalid file name: must contain only [a-z0-9_.]
[ERROR] Application Installer abnormal process termination. Process exit value was 1

Now I went into the file path of Titanium_studio_workspace/MY_APP/build/android/res/drawable and changed Icon.png to icon.png. But after doing that, I hit run and it again failed at installing the app and gave me this error:

[ERROR] :  Failed to package application:
[ERROR] :  
[ERROR] :  /Users/ebads/Desktop/workspace/MY_APP/build/android/AndroidManifest.xml:4: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/Icon').
[ERROR] Application Installer abnormal process termination. Process exit value was 1

I went into /MY_APP/build/android/AndroidManifest.xml and changed the typo in the XML from Icon to icon. Guess what? After hitting run again, I get the first error all over again and when I check the path Titanium_studio_workspace/MY_APP/build/android/res/drawable, icon.png gets changed back to Icon.png !! Titanium Studio changed it back. How can I fix this?

NOTE: I am using Titanium Studio 3.2.3GA. The app is cross platform and works fine when using the iPad simulator. I trying to install/run the app on a Nexus 10 Android tablet that is running 4.4 KitKat. Not sure if this information helps.

EDIT: I just wanted to mention that the code is proprietary.


Solution

  • I figured it out on my own. You must make sure that the names of the file(s) in the above mentioned file paths must also be spelled the same way in the tiapp.xml file as well.