Android '找不到活动的兼容 AVD 或设备

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20779247/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 03:26:06  来源:igfitidea点击:

'No active compatible AVD's or devices found

androideclipseadbadtlaunch

提问by user3135716

I'm new with Eclipse ADT, and I tried to run an app on my tablet (a Samsung Galaxy Note 10.1), but there is an error as below:

我是 Eclipse ADT 的新手,我尝试在我的平板电脑(三星 Galaxy Note 10.1)上运行一个应用程序,但出现如下错误:

[2013-12-26 12:37:41 - SDK_Example] ------------------------------

[2013-12-26 12:37:41 - SDK_Example] Android Launch!

[2013-12-26 12:37:41 - SDK_Example] adb is running normally.

[2013-12-26 12:37:41 - SDK_Example] Performing com.metaio.Example.MainActivity activity launch

[2013-12-26 12:37:41 - SDK_Example] No active compatible AVD's or devices found. Relaunch this configuration after connecting a device or starting an AVD.

Can anyone tell me why my device isn't found?

谁能告诉我为什么找不到我的设备?

回答by vovahost

So if you are using emulator then close it.
In Eclipse select Run > Run Configurations > Target > Always prompt to pick device > Run.
Now select a a device from the list or a launch a new emulator. The next time you Run the project it should work.

因此,如果您正在使用模拟器,请关闭它。
在 Eclipse 中选择Run > Run Configurations > Target > Always prompt to pick device > Run
现在从列表中选择一个设备或启动一个新的模拟器。下次运行项目时,它应该可以工作。

回答by GrIsHu

The error shows that the API level which your application having the compatible emulator for that API level does not exists. You need to create the emulator compatible to your application's api level.

该错误表明您的应用程序具有该 API 级别的兼容模拟器的 API 级别不存在。您需要创建与您的应用程序的 api 级别兼容的模拟器。

OR

或者

If your emulator is already started then You need to reset the ADB to make the emulator available. Go to DDMS > In Device tab > Select Down arrow> Select Reset adb option.

如果您的模拟器已经启动,那么您需要重置 ADB 以使模拟器可用。去DDMS > In Device tab > Select Down arrow> Select Reset adb option.

Check out the image enter image description here

查看图片 在此处输入图片说明

回答by Swayam

Seems like your device is not getting detected by the ADB.

ADB 似乎没有检测到您的设备。

Check if you have enabled USB debuggingin your tablet or not. Sometimes disconnecting and re-connecting the device also makes it work. Also bear in mind that the API level of your application should be supported by your device.

检查您的平板电脑是否启用了 USB 调试。有时断开并重新连接设备也会使其工作。另请记住,您的设备应支持应用程序的 API 级别。

回答by BABU K

This error message will appear , if there are no compatible android API in SDK is found. Try to update your eclipse with appropriate API. To update your API go to Window -> Android SDK Manager. Then choose required API version from Android SDK Manager window. Finally press install packages button .After required packages installation completed, create new AVD for your project and Run your project.

如果在 SDK 中找不到兼容的 android API,则会出现此错误消息。尝试使用适当的 API 更新您的 Eclipse。要更新您的 API,请转到 Window -> Android SDK Manager。然后从 Android SDK Manager 窗口中选择所需的 API 版本。最后按安装包按钮。完成所需的包安装后,为您的项目创建新的 AVD 并运行您的项目。

回答by M D

You have to create an emulator or use a device that is compatible with API target. i.e the device or emulator should have a android version that is compatible with your project.

您必须创建模拟器或使用与 API 目标兼容的设备。即设备或模拟器应具有与您的项目兼容的 android 版本。

回答by vinay Maneti

In androidmanifest.xmltry to support the version from API level 8 onward

androidmanifest.xml尝试从支持API级别8以后的版本

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="19" />

and even try to unable USB debuggingin your mobile ..

甚至尝试无法在您的手机中进行USB 调试..

Before to that you should have Mobile sync installed in the system...

在此之前,您应该在系统中安装移动同步...

once you try to edit the code in the project and even try to clean the project and run it ..,

一旦您尝试编辑项目中的代码,甚至尝试清理项目并运行它..,

回答by Peter Robert Wadeck

I had the same problem. I had usb debugging set and eclipse was running the app fine and then it stopped one day. I discovered, with the help of other comments here that my phone had to be set as a mass storage device otherwise it wouldn't work. Once I changed it from camera, or another setting to mass storage it worked. I must have played with the usb setting and changed it. The manual didn't mention that mass storage was necessary.

我有同样的问题。我设置了 USB 调试并且 eclipse 运行该应用程序正常,然后有一天它停止了。我发现,在其他评论的帮助下,我的手机必须设置为大容量存储设备,否则它将无法工作。一旦我将它从相机或其他设置更改为大容量存储,它就起作用了。我一定玩过 USB 设置并更改了它。手册没有提到大容量存储是必要的。