Android 没有找到兼容的目标
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12741289/
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
No compatible targets were found
提问by Achaius
I am having
我有
target android-4
目标 android-4
in project.properties. In eclipse when I run the project I am getting the error
在 project.properties 中。在 Eclipse 中运行项目时出现错误
No compatible targets were found
没有找到兼容的目标
How to resolve this>
如何解决这个>
采纳答案by Chirag
Create AVD that supports android-4(Android 1.6)or change your android-4 target to android-8.
创建支持 android-4(Android 1.6) 的 AVD或更改您的android-4 target to android-8.
How to create new AVD ?
如何创建新的 AVD?
on Eclipse, [Window> Android AVD Manager] select,
you press the [new] button, you can create new Android Virtual Device
回答by Anup Cowkur
You have to create an emulator or use a device that is compatible with this target. i.e the device or emulator should have a android version that is compatible with this project.
您必须创建一个模拟器或使用与此目标兼容的设备。即设备或模拟器应具有与此项目兼容的 android 版本。
For running an Emulator instance, you will have to create a virtual android device. For this you will need the AVD - In Eclipse click "Window -> Android SDK and AVD manager" Click create new AVD and this screen will pop up. Create the virtual device with your target or higher and run your project.
要运行 Emulator 实例,您必须创建一个虚拟的 android 设备。为此,您将需要 AVD - 在 Eclipse 中单击“窗口 -> Android SDK 和 AVD 管理器”单击创建新的 AVD,将弹出此屏幕。使用您的目标或更高版本创建虚拟设备并运行您的项目。
check this tutorial out for more info: https://developer.android.com/tools/devices/managing-avds.html
查看本教程了解更多信息:https: //developer.android.com/tools/devices/managing-avds.html
回答by P.Melch
you can either run an app on the emulator or an actual device.
您可以在模拟器或实际设备上运行应用程序。
to run it on the emulator you need to create a matching virtual device first ( see http://developer.android.com/tools/devices/index.html)
要在模拟器上运行它,您需要先创建一个匹配的虚拟设备(请参阅http://developer.android.com/tools/devices/index.html)
to run it on the device, plug in a device and install the proper usb driver (see http://developer.android.com/tools/extras/oem-usb.html)
要在设备上运行它,请插入设备并安装正确的 USB 驱动程序(请参阅http://developer.android.com/tools/extras/oem-usb.html)
回答by G M Ramesh
try to change the target android-4
to target android-15
in your project.properties and than refresh the project run again
尝试在您的 project.properties 中更改target android-4
为target android-15
,然后再次刷新项目运行
回答by Dan-Nolan
If you're trying to run the application on your phone; I had the same problem and I found a solution that worked for me:
如果您尝试在手机上运行该应用程序;我遇到了同样的问题,我找到了一个对我有用的解决方案:
Try enabling USB Debuggingon your phone.
尝试在手机上启用USB 调试。
I have a Samsung Galaxy SIII and I enabled USB Debugging by going into Settings > Developer Options. Then check the USB Debuggingoption and allow your computer to install the necessary drivers when connected. Hope this helps!
我有一台三星 Galaxy SIII,我通过进入Settings > Developer Options启用了 USB 调试。然后检查USB 调试选项并允许您的计算机在连接时安装必要的驱动程序。希望这可以帮助!
回答by live-love
If you are developing on Windows, to debug on a device, first you have to install the driver using these instructions here:
如果您在 Windows 上进行开发,要在设备上进行调试,首先您必须使用以下说明安装驱动程序:
http://developer.android.com/tools/extras/oem-usb.html
http://developer.android.com/tools/extras/oem-usb.html
You can find the driver in the ...\sdk\extras\google\usb_driver\ folder.
您可以在 ...\sdk\extras\google\usb_driver\ 文件夹中找到驱动程序。
Then you will have to enable USB debugging on your device.
然后您必须在您的设备上启用 USB 调试。
On most devices running Android 3.2 or older, you can find the option under Settings > Applications > Development.
在大多数运行 Android 3.2 或更早版本的设备上,您可以在“设置”>“应用程序”>“开发”下找到该选项。
On Android 4.0 and newer, it's in Settings > Developer options.
在 Android 4.0 及更高版本上,它位于设置 > 开发人员选项中。
On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.
在 Android 4.2 及更高版本上,默认情况下隐藏开发人员选项。要使其可用,请转到“设置”>“关于手机”,然后点击“版本号”七次。返回上一个屏幕以找到开发人员选项。
回答by Neil
Galaxy S4users need to go to Settings > More button > About device
Galaxy S4用户需要转到设置 > 更多按钮 > 关于设备
Next you have to tap Build number (greyed out) 7 timesthen you get an option in previous menu called Developer options, select this and then tick USB debugging
接下来,您必须点击内部版本号(变灰)7 次,然后您会在前面的菜单中看到一个名为Developer options 的选项,选择它,然后勾选USB 调试