Eclipse 不断启动新的模拟器
我正忙于学习如何为 Android 构建应用程序,遇到了一个非常尴尬的问题.
I'm busy learning how to build apps for Android, and I come across a very awkward problem.
当我运行我的应用程序(其中带有播放图标的绿色圆圈)时,它会启动一个 Android 模拟器(就像它应该的那样),但一旦启动模拟器,应用程序就不会启动.当我再次单击运行按钮时,它会尝试启动第二个 android-emulator.在控制台选项卡中,它提供以下消息:
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:UsersRoy.androidavdAndroid_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 Home Premium 64 位上运行带有 ADT 15.0.0 的 Java 开发人员的 Eclipse IDE(Indigo Service Release 1)
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
推荐答案
如果模拟器已经启动,那可能意味着 adb 正在运行.在 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
你可以试试(摆脱 'sudo' 业务).
You could try that (get rid of the 'sudo' business).
相关文章