Problems launching Android java project in a Andro

2019-02-20 23:42发布

问题:

I have installed and set up Eclipse and the plugin ADT in order to work with Android SDK. So far so good. But when I try to launch a VM(virtual Machine) for any android platform that I choose (for example: android 3.2) I just get the skin launched together with a keyboard console and phone buttons, it seems to boot up to a state and then does nothing but displays the android logo on the main vm screen and that's all it does - no more!, no VM functionality!, what's going on? Have I missed out some step? Please help...

Have been waiting sometimes over 10 mins in each case for the emulator to start.

I launched/ran an Android project test sample; 'hello world' from the eclipse environment after installing the ADT plugin for Android These are the error messages I had displayed in the console ddms:

[2012-04-30 14:31:20 - HelloAndroid]

[2012-04-30 14:31:20 - HelloAndroid] Android Launch!

[2012-04-30 14:31:20 - HelloAndroid] adb is running normally.

[2012-04-30 14:31:20 - HelloAndroid] Performing com.example.helloandroid.HelloAndroidActivity activity launch

[2012-04-30 14:31:20 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'leighs_basic_hardware_secound_virtual_device'

[2012-04-30 14:31:20 - HelloAndroid] Launching a new emulator with Virtual Device 'leighs_basic_hardware_secound_virtual_device'

[2012-04-30 14:31:40 - Emulator] Warning: No DNS servers found

[2012-04-30 14:31:52 - Emulator] emulator: emulator window was out of view and was recentered [2012-04-30 14:31:52 - Emulator]

[2012-04-30 14:31:53 - HelloAndroid] New emulator found: emulator-5554

[2012-04-30 14:31:53 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...

[2012-04-30 14:49:03 - HelloAndroid] HOME is up on device 'emulator-5554' [2012-04-30 14:49:03 - HelloAndroid] Uploading HelloAndroid.apk onto device 'emulator-5554'

[2012-04-30 14:49:03 - HelloAndroid] Installing HelloAndroid.apk...

[2012-04-30 14:51:38 - HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554!

[2012-04-30 14:51:38 - HelloAndroid] (null) [2012-04-30 14:51:39 - HelloAndroid] Launch canceled!

At no point have I have anything but the Android logo displayed on my emulator. I have tried various platform emulators - none of them are performing!

A second lot of errors I received back on a test run after I checked the user data wiped in the Run configuration menu was: result

: [2012-04-30 17:20:27 - Emulator] Failed to allocate memory: 1455 [2012-04-30 17:20:27 - Emulator]

[2012-04-30 17:20:27 - Emulator] This application has requested the Runtime to terminate it in an unusual way. [2012-04-30 17:20:27 - Emulator] Please contact the application's support team for more information.

Bench mark results of my computer using Novabench incase anyone wants to check, are:

30/04/2012 17:45:59 Microsoft Windows 7 Starter Intel Atom N550 1.50GHz @ 1500 MHz Graphics Card: Intel(R) Graphics Media Accelerator 3150 1014 MB System RAM (Score: 78) - RAM Speed: 1610 MB/s CPU Tests (Score: 70) - Floating Point Operations/Second: 24110532 - Integer Operations/Second: 43813828 - MD5 Hashes Generated/Second: 159380 Graphics Tests (Score: 1) - 3D Frames Per Second: 3 Hardware Tests (Score: 6) - Primary Partition Capacity: 87 GB - Drive Write Speed: 14 MB/s

回答1:

Do you Run your project or only start an emulator? After starting emulator, click Run button and select "Run as Android project".



回答2:

I am not sure how long you waited, but starting the emulator the first time (before you have a snapshot) can take quite a long time. Depending on you hardware it can take more than 10 minutes to launch.



回答3:

I had a similar issue which was solved by creating a new emulator and running it. You can check progress in Devices view through DDMS. Sometimes, this problem may occur when a snapshot enabled emulator hangs because of error, which can be solved by starting the emulator with user data wiped.



回答4:

Emulator thread automatically cuts off if for some time you have not done any activity on it.. so.. keep running your app to keep emulator on LIVE!

My advice - if you having an android phone.. please usb debug it and Debug your application on your phone... You will feel relieved from the long durations of the emulator........ to run!! :)