Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't execute my app in Android SDK with Titanium Studio 3.1.0

I'm on iMac with X.8.3 and i'm trying to make my test application working with Titanium Studio and Android SDK 2.2, the apps works on iPhone Simulator but not on Android.

Here is the terminal error when trying to execute the app in Android Emulator

"[INFO] logfile = /Users/*****/Documents/Titanium_Studio_Workspace/Geocoder/build.log

[ERROR] :  Build process exited with code 1

[ERROR] :  Project failed to build after 208ms

[ERROR] :  Emulator process exited with code 1"

and the log file says the same.

I've tried the android emulator with Eclipse and it works pretty well!

On the Dashboard page of Titanium Studio the icon of Android SDK stay in Red, it says

"Android configuration details. One or more pieces are missing from the Android SDK. It may be that the Android SDK is already installed and Titanium Studio cannot locate the directory, or it may be that some additional components need to be installed.

Items required:

An Android SDK is missing. Titanium requires Android platform 2.2.* Add-On Google APIs version 8"

I've already tryied to remove and install it all 2 times and it doesn't change anything.

In the preferences of Titanium / Studio / Plateforms / Android it's seems to be Ok with the android sdk, the dropdown android sdk sees 3 versions of android 4.2.2 and Google API.

like image 562
Stéphane Demarche Avatar asked Mar 24 '23 03:03

Stéphane Demarche


2 Answers

I just had the same problem while trying to start the Kitchen Sink app. In my case the problem was that tiapp.xml referred to and Android SDK that was not installed on my machine.

I changed the SDK version number in these lines from 11 to 14

<uses-sdk android:targetSdkVersion="14"/>
<tool-api-level>14</tool-api-level>

Another possible option would be to install the SDK version that is called in tiapp.xml.

like image 122
beeman Avatar answered Mar 26 '23 16:03

beeman


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

like image 30
N'Kauh Nathan-Régis Bodje Avatar answered Mar 26 '23 18:03

N'Kauh Nathan-Régis Bodje