简体   繁体   中英

AVD starts every time I run an Android project

每次我从Eclipse运行我的Android项目时,它都会启动一个新的Android虚拟设备来运行它。如何让它在现有的AVD中运行?

编辑运行或调试配置(运行=>运行配置)并设置目标模式手册。

For those who the AVD always restarting (And ADB never find your device online).

  1. Close all AVD open
  2. Go to your adb folder with command line ( cd "C:\\Program Files (x86)\\Android\\android-sdk\\platform-tools>" for me)
  3. Kill ADB with adb kill-server
  4. Open an AVD with AVD Manager
  5. Wait 5 sec and restart adb with command: adb start-server
  6. Type adb devices

Your devices should appear.

create a new AVD manually and also Run your Android Project with following steps:

  1. Right Click on your Project
  2. Click on Run As
  3. Click on Run Configuration
  4. click on Target and select Manual .

Select the AVD you just created and click Apply .

With this, your application will always ask you before running.

how can i deal with this?

It can be dealt with in many ways. You don't mention how you expect it to behave.

If an android device is plugged in the usb slot and its version is > android:minSdkVersion you have set in your manifest file, the app should automatically run on your device.

if you want to run on an AVD, right click on project -> Run as -> Run configurations ->Target -> Check an already existing AVD. Everytime you run the app, it will load on that AVD.

Follow these steps:

  1. Delete the AVD
  2. Close Eclipse
  3. Reopen Eclipse
  4. Create new AVD
  5. Set newly created AVD to your project's Run Configuration
  6. Run the project

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM