我正在关注Phonegap Android入门指南:http://docs.phonegap.com/en/2.4.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android
经过大量的摆弄,我得到了以下版本的所有内容:Phonegap 2.4 Android SDK工具21.1 Android SDK平台工具16.0.1 Android SDK Platform 4.2
当我在模拟器中运行应用程序(通过Eclipse)时,它会启动,但会显示闪烁的Android徽标 . 如果我右键单击该项目并再次运行,控制台将显示该应用程序正在安装并启动 . 但是,android徽标仍然存在 .
控制台日志:
[2013-02-21 02:27:16 - testapp] Waiting for HOME ('android.process.acore') to be launched...
[2013-02-21 02:28:04 - testapp] ------------------------------
[2013-02-21 02:28:04 - testapp] Android Launch!
[2013-02-21 02:28:04 - testapp] adb is running normally.
[2013-02-21 02:28:04 - testapp] Performing com.rb.testapp.testapp activity launch
[2013-02-21 02:28:05 - testapp] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'test'
[2013-02-21 02:28:05 - testapp] Uploading testapp.apk onto device 'emulator-5554'
[2013-02-21 02:28:45 - testapp] Installing testapp.apk...
[2013-02-21 02:29:04 - testapp] Success!
[2013-02-21 02:29:05 - testapp] Starting activity com.rb.testapp.testapp on device emulator-5554
如果我从命令行/cordova/run.bat运行应用程序 . 模拟器以空白屏幕启动 . 控制台报告应用程序已安装并启动 .
我猜我正在运行的模拟器版本存在问题 . 我的CPU不支持虚拟化 . 有没有办法让这个运行?
非常感谢 .
1 回答
好吧,我通过安装Android SDK 4.0平台并将其用于我的模拟器来解决这个问题 . 很明显有一个解决方案(虽然我没试过这个):PhoneGap not firing deviceready on Android 4.2
我在这里记录了我的设置过程:http://cookieflow.wordpress.com/2013/02/24/installing-android-4-2-sdk-and-phonegap-2-4-0-on-windows-7/