简体   繁体   中英

Android Emulator in Titanium not working?

I have a problem launching the android simulator on Titanium Studio;

I did everthing, i should do.

Here is the ERROR:

    [INFO] :   Generating i18n files
[INFO] :   Compiling localization files
[INFO] :   Generating D:\Android\Titanium\SpaceJam\build\android\res\values\theme.xml
[WARN] :   Detected Titanium.Map.createView() call which requires Google APIs, but the selected emulator "api_8" does not support Google APIs
[WARN] :   Expect the Titanium.Map.createView() call to fail
[WARN] :   You should use, or create, an Android emulator that does support Google APIs
[INFO] :   Packaging application: D:\ECLLIPSE LATEST\sdk\build-tools\android-4.3\aapt.exe "package" "-f" "-m" "-J" "D:\Android\Titanium\SpaceJam\build\android\gen" "-M" "D:\Android\Titanium\SpaceJam\build\android\AndroidManifest.xml" "-A" "D:\Android\Titanium\SpaceJam\build\android\bin\assets" "-S" "D:\Android\Titanium\SpaceJam\build\android\res" "-I" "D:\ECLLIPSE LATEST\sdk\platforms\android-19\android.jar" "-I" "C:\Users\biri.singh\AppData\Roaming\Titanium\mobilesdk\win32\3.2.2.GA\android\titanium.jar" "-F" "D:\Android\Titanium\SpaceJam\build\android\bin\app.ap_"
[INFO] :   Creating unsigned apk
[INFO] :   Processing D:\Android\Titanium\SpaceJam\build\android\src
[INFO] :   Writing unsigned apk: D:\Android\Titanium\SpaceJam\build\android\bin\app-unsigned.apk
[INFO] :   Determining signature algorithm: C:\Program Files\Java\jdk1.7.0_51\bin\keytool.exe "-J-Duser.language=en" "-v" "-list" "-keystore" "C:\Users\biri.singh\AppData\Roaming\Titanium\mobilesdk\win32\3.2.2.GA\android\dev_keystore" "-storepass" "*******" "-alias" "tidev"
[INFO] :   Using MD5withRSA signature algorithm
[INFO] :   Signing apk: C:\Program Files\Java\jdk1.7.0_51\bin\jarsigner.exe "-sigalg" "MD5withRSA" "-digestalg" "SHA1" "-keystore" "C:\Users\biri.singh\AppData\Roaming\Titanium\mobilesdk\win32\3.2.2.GA\android\dev_keystore" "-storepass" "*******" "-signedjar" "D:\Android\Titanium\SpaceJam\build\android\bin\SpaceJam.apk" "D:\Android\Titanium\SpaceJam\build\android\bin\app-unsigned.apk" "tidev"
[INFO] :   Aligning zip file: D:\ECLLIPSE LATEST\sdk\tools\zipalign.exe "-v" "4" "D:\Android\Titanium\SpaceJam\build\android\bin\SpaceJam.apk" "D:\Android\Titanium\SpaceJam\build\android\bin\SpaceJam.apkz"
[INFO] :   Writing build manifest: D:\Android\Titanium\SpaceJam\build\android\build-manifest.json
[INFO] :   Making sure the adb server is running
[INFO] :   Waiting for emulator to become ready
[ERROR] :  Emulator failed to start in a timely manner
The current timeout is set to 120000 ms
[ERROR] Application Installer abnormal process termination. Process exit value was 1

Any help on what I'm doing wrong would be welcomed, thanks!

There are two errors here.
The first has to do with using a function that is not supported by version 8 of the API -- I believe that you need to use version 16 or greater.
The second, which emits the message "Waiting for emulator to become ready" is caused by the emulator not being ready at the time that the launch wants to install your app. So you need install the app manually.
You will find your app's executable in the following directory under your app directory: build/android/bin/YOURAPPNAME.apk. On the Mac, you need to open a terminal window, cd to that directory, and type "chmod 777 YOURAPPNAME.apk". Then cd to the platform-tools directory under your android sdk installation directory, and run the following commands:

./adb kill-server
./adb start-server
./adb install <full path name to YOURAPPNAME.apk>

You will see your app appear on the home screen of the emulator.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM