Eclipse的不断启动新的仿真器仿真器、Eclipse

2023-09-05 06:24:02 作者:总有刁民想害朕。

我正忙着学习如何构建应用程序为Android,我遇到一个很尴尬的问题。

I'm busy learning how to build apps for Android, and I come across a very awkward problem.

当我运行我的应用程序(用绿色圆圈在它的播放图标),它启动Android仿真器(如它应该),但应用程序不启动,一旦模拟器启动。当我再次点击运行按钮,它会尝试启动第二的Andr​​oid模拟器。在控制台选项卡上它提供了以下信息:

When I run my application (with the green circle with the play-icon in it), it starts an Android emulator (like it should), but the application doesn't start once the emulator is booted. When I click the run-button again, it tries to start a second android-emulator. In the console-tab it gives the following messages:

[2011-11-07 20:57:15 - ScrollView Demo] Android Launch!
[2011-11-07 20:57:15 - ScrollView Demo] adb is running normally.
[2011-11-07 20:57:15 - ScrollView Demo] Performing testapp.scrollviewdemo.MainActivity activity launch
[2011-11-07 20:57:15 - ScrollView Demo] Automatic Target Mode: launching new emulator with compatible AVD 'Android_emulator'
[2011-11-07 20:57:15 - ScrollView Demo] Launching a new emulator with Virtual Device 'Android_emulator'
[2011-11-07 20:57:18 - Emulator] WARNING: Data partition already in use. Changes will not persist!
[2011-11-07 20:57:18 - Emulator] WARNING: SD Card image already in use: C:\Users\Roy\.android\avd\Android_emulator.avd/sdcard.img
[2011-11-07 20:57:18 - Emulator] WARNING: Cache partition already in use. Changes will not persist!

这就像Eclipse不承认它启动模拟器... 奇怪的是,有时它承认它,但大多数时候它没有。

It's like Eclipse doesn't recognize the emulators it starts... Weird thing is, sometimes it does recognize it, but most of the times it doesn't.

如果这有什么差别:我的Win7家庭premium 64

If it makes any difference: I'm running Eclipse IDE for Java Developers (Indigo Service Release 1) with ADT 15.0.0 on Win7 Home Premium 64bit

推荐答案

如果模拟器已经启动,这可能意味着亚行采取行动了起来。不知道在Windows上,但在Mac / Linux上我做到以下几点:

If the emulator has started, that may mean adb is acting up. Not sure on windows, but on mac/linux I do the following:

adb kill-server
sudo adb devices

您可以尝试这(摆脱'须藤'业务)。

You could try that (get rid of the 'sudo' business).