2

I have this issue with Titanium Studio. I can't compile my project for Android. I try to Run or Debug to project, but I've got this message:

Titanium Command-Line Interface, CLI version 3.1.0, Titanium SDK version 3.1.0.GA
Copyright (c) 2012-2013, Appcelerator, Inc.  All Rights Reserved.
[INFO] :   Running emulator process: python "C:\Users\Dev\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py" "emulator" "MyApp" "E:\Developpement\Mobile\SDKs\Android" "E:\Developpement\Mobile\Appcelerator\MyApp" "com.developper.myapp" "2" "WVGA854" "armeabi"

[INFO] :   Running build process:  python "C:\Users\Dev\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py" "simulator" "MyApp" "E:\Developpement\Mobile\SDKs\Android" "E:\Developpement\Mobile\Appcelerator\MyApp" "com.developper.myapp" "2" "WVGA854" "/127.0.0.1:49314"

[INFO] logfile = E:\Developpement\Mobile\Appcelerator\MyApp\build.log

[INFO] Building MyApp for Android ... one moment

[INFO] Titanium SDK version: 3.1.0 (04/15/13 18:45 57634ef)

[ERROR] :  Emulator process exited with code 1

[INFO] :   Project built successfully in 5s 421ms

[INFO] :   Emulator not running, exiting...

The emulator is not starting and no APK file is built in the bin folder. I have the Android 2.2 and 4.2.2 SDK installed. I tried everythings (clean project, even uninstall and reinstall Titanium studio).

I did this project with Titanium 2.1.4. Now I'm using 3.1.0 and I got this error message. In tiapp.xml, if I choose to run the project with the Titanium 2.1.4 SDK I got these messages :

[INFO] logfile = E:\Developpement\Mobile\Appcelerator\MyApp\build.log

[INFO] Launching Android emulator...one moment

[INFO] Creating new Android Virtual Device (2 WVGA854)

[ERROR] Exception occured while building Android project:

[ERROR] Traceback (most recent call last):

[ERROR]   File "C:\Users\Dev\AppData\Roaming\Titanium\mobilesdk\win32\2.1.4.GA\android\builder.py", line 2282, in <module>

[ERROR]     s.run_emulator(avd_id, avd_skin, avd_name, avd_abi, add_args)

[ERROR]   File "C:\Users\Dev\AppData\Roaming\Titanium\mobilesdk\win32\2.1.4.GA\android\builder.py", line 523, in run_emulator

[ERROR]     avd_name = self.create_avd(avd_id, avd_skin, avd_abi)

[ERROR]   File "C:\Users\Dev\AppData\Roaming\Titanium\mobilesdk\win32\2.1.4.GA\android\builder.py", line 485, in create_avd

[ERROR]     inifilec = open(inifile,'r').read()

[ERROR] IOError: [Errno 2] No such file or directory: 'C:\\Users\\Dev\\.android\\avd\\titanium_2_WVGA854.avd\\config.ini'

And then :

[INFO] logfile = E:\Developpement\Mobile\Appcelerator\MyApp\build.log

[INFO] Building MyAppfor Android ... one moment

[INFO] Titanium SDK version: 2.1.4 (11/09/12 12:46 51f2c64)

[ERROR] Application Installer abnormal process termination. Process exit value was 1

[ERROR] Timed out waiting for emulator to be ready, you may need to close the emulator and try again

No emulators are running and no APKs are built. If anyone has an idea...

I'm using Win7 64bits. Maybe I missed somthing during the configuration.

Thank you for your help.

user486286
  • 21
  • 1
  • 1
  • 2

4 Answers4

5

If this happens with the Kitchen Sink demo, the fix is to go into the Android SDK Manager and install "Android 3.0 (API 11)". Make sure the app uses emulator "Google APIs (Android 2.3.3)" and "WVGA854". I assume there's a Titanium bug because you have to install a higher API level (3.0) than is actually used (2.3.3). Using exactly these settings, Kitchen Sink works as expected.

BSalita
  • 8,420
  • 10
  • 51
  • 68
0

Did you read System Requirements?

From Documentation:

For Windows, the 32-bit version of Java JDK is required regardless of whether Titanium is running on a 32-bit or 64-bit system.

Try to install additional 32bit version of Java (without removing the 64bit) and set the system variable. May be this will help you.

Community
  • 1
  • 1
Anand
  • 5,323
  • 5
  • 44
  • 58
0

Answer 1 :

Seems build tools got moved to another directory with the latest Android SDK update. Created symlinks to aapt and dx in /Applications/Android-sdk/platform-tools:

ln -s /Applications/Android-sdk/build-tools/17.0.0/aapt aapt ln -s /Applications/Android-sdk/build-tools/17.0.0/dx dx

This solved it for me (after some digging in their Python code).

Answer 2 :

I'm on windows so i used mklink. I had to add a link to lib/dx.jar for it to work. What I dit was first add folder 'lib' to platform-tools folder and after in command line:

cd %YOUR_ANDROID_DIR%\platform-tools    
mklink aapt.exe ..\build-tools\android-4.2.2\aapt.exe
mklink dx.bat ..\build-tools\android-4.2.2\dx.bat      
cd lib                              
mklink dx.bat ..\..\build-tools\android-4.2.2\lib\dx.jar

Answer 3 :

I copied the following files:

C:\Android\build-tools\17.0.0\aapt.exe to C:\Android\platform-tools\aapt.exe
C:\Android\build-tools\17.0.0\dx.bat  to  C:\Android\platform-tools\dx.bat
C:\Android\build-tools\17.0.0\lib  to  C:\Android\platform-tools\lib

I then cleaned the project and rebuilt and everything is now working.

Source here : http://developer.appcelerator.com/question/152497/titanium-sdk-310-error-typeerror-argument-of-type-nonetype-is-not-iterable-on-building-android-app#comment-175782

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
0

I had a similar problem, when I was trying to run a project on Android I got:

[ERROR] :  Emulator process exited with code 1
[ERROR] :  Build process exited with code 1
[ERROR] :  Project failed to build after 234ms
[ERROR] Application Installer abnormal process termination. Process exit value was 1

I tried compiling with different previous android sdks 2.3.3, 2.1, 2.2 because the app presumed of being compatible with them, but no luck.

The solution was to delete/change this tag/line within Android Tag on Tiapp.xml

<tool-api-level>15</tool-api-level>

It was pointing to Api 15 (Android sdk 4.0.3) and I hadn't installed. Personally I've deleted that line.

That solution worked for Kitchen Sink too, you must delete/change the same tag/line mentioned above. Now I have it builded for the Api 10 (Android sdk 2.3.3) the one I use.

kabomi
  • 526
  • 2
  • 10