I am trying the helloworld example for PhoneGap. http://www.phonegap.com/start/#android When I start the android emulator, in 30 seconds the default Android screen is displayed but not the HTML with hello world. Log looks like :
[2011-03-06 12:36:17 - SampleApp] ------------------------------
[2011-03-06 12:36:17 - SampleApp] Android Launch!
[2011-03-06 12:36:17 - SampleApp] adb is running normally.
[2011-03-06 12:36:17 - SampleApp] Performing sample.app.Sample activity launch
[2011-03-06 12:36:17 - SampleApp] Automatic Target Mode: launching new emulator with compatible AVD 'Vede'
[2011-03-06 12:36:17 - SampleApp] Launching a new emulator with Virtual Device 'Vede'
[2011-03-06 12:36:17 - Emulator] emulator: emulator window was out of view and was recentred
[2011-03-06 12:36:17 - Emulator]
[2011-03-06 12:36:18 - SampleApp] New emulator found: emulator-5554
[2011-03-06 12:36:18 - SampleApp] Waiting for HOME ('android.process.acore') to be launched...
[2011-03-06 12:36:53 - SampleApp] WARNING: Appli开发者_StackOverflow社区cation does not specify an API level requirement!
[2011-03-06 12:36:53 - SampleApp] Device API version is 10 (Android 2.3.3)
[2011-03-06 12:36:53 - SampleApp] HOME is up on device 'emulator-5554'
[2011-03-06 12:36:53 - SampleApp] Uploading SampleApp.apk onto device 'emulator-5554'
[2011-03-06 12:36:53 - SampleApp] Installing SampleApp.apk...
[2011-03-06 12:37:22 - SampleApp] Success!
[2011-03-06 12:37:23 - SampleApp] Starting activity sample.app.Sample on device emulator-5554
[2011-03-06 12:37:24 - SampleApp] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=sample.app/.Sample }
The Android 2.3 emulator does not work with Phonegap 0.9.4(and earlier). See http://code.google.com/p/android/issues/detail?id=12987 for details.
There are two paths you can take:
- Use the Android 2.2 emulator instead.
- Use the latest PhoneGap source from https://github.com/phonegap/phonegap-android. A workaround for the Android emulator has recently been implemented and will also be available with 0.9.5
I'm pretty new to Android myself, sometimes the emulator launches the code and sometimes not for me. I usually have to press 'menu' then the grid at the bottom which will then bring up all the apps on the phone, your app should be among them, just click on it to launch.
精彩评论