eclipse 我可以将连接的设备设置为默认启动目标吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2243651/
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
Can I set an attached device as default launch target?
提问by olof
In Eclipse I am developing an application using Google APIs (maps)on a Nexus One.
When I launch the application for debugging on the device i get:
在 Eclipse 中,我正在Nexus One 上使用Google API(地图)开发应用程序。
当我在设备上启动调试应用程序时,我得到:
"Automatic Target Mode: Unable to detect device compatibility. Please select a target device."
“自动目标模式:无法检测设备兼容性。请选择目标设备。”
and the "Android Device Chooser" pops up.
I can select the Nexus One and everything is ok. It annoys me, however, that i need to select the device every time i want to test something.
并弹出“Android 设备选择器”。
我可以选择 Nexus One,一切正常。然而,让我烦恼的是,每次我想测试某些东西时都需要选择设备。
Setting a build target name to any standard android version (not using Google apis) automatically launches my app without showing the Android Device Chooser. But since i need the maps, that is not an option for me.
将构建目标名称设置为任何标准 android 版本(不使用 Google apis)会自动启动我的应用程序,而不会显示 Android 设备选择器。但由于我需要地图,这对我来说不是一个选择。
Is there a way to force an application using Google apis, to be launched on the attached device without showing the Android Device Chooser?
有没有办法强制使用 Google apis 的应用程序在连接的设备上启动而不显示 Android 设备选择器?
回答by whlk
Go to your project properties. Select Run/Debug Settings
, click the Edit
button of your run configuration, select the Target
tab in the upcoming dialog, switch the selectboxes to "Automatic" and check the checkbox by your device.
转到您的项目属性。选择Run/Debug Settings
,单击Edit
运行配置的按钮,Target
在即将出现的对话框中选择选项卡,将选择框切换到“自动”并选中您设备的复选框。
回答by systempuntoout
This is an irritating acknowledged defect (Issue 11373) reported on the Android Issue tracker.
这是Android 问题跟踪器上报告的一个令人恼火的公认缺陷(问题 11373)。
The Issue has status Assignedand presumably will be fixed.
问题的状态为已分配,大概会得到修复。
回答by RaphMclee
Once the popup comes up to choose a device, select your device and then check the Use same device for future uses
at the button of the Dialog.
一旦弹出选择设备,选择您的设备,然后检查Use same device for future uses
对话框的按钮。
回答by Mark Murphy
I was just having this problem and traced it to my USB connection. I had started using a 2.0 hub, which I would think to be sufficient. It's powered. When I plugged the USB cable into the laptop itself, problem solved.
我刚刚遇到了这个问题,并将其追溯到我的 USB 连接。我已经开始使用 2.0 集线器,我认为这已经足够了。它通电了。当我将 USB 电缆插入笔记本电脑本身时,问题解决了。
Good luck.
祝你好运。
Mark
标记
回答by Bipin Vayalu
This may be useful to you.
这可能对您有用。
First Find the Your device OS Version & API Level.
IN Eclipse, Then Right click on Your project select Property, In Property's window select Android, In it select Project Build Target as per your device OS API Level.
For example i have Samsung Galaxy Fit - Android 2.2 os API Level - 8 so i,selected the Google APIs, Google Inc, 2.2, 8 .
首先找到您的设备操作系统版本和 API 级别。
在 Eclipse 中,然后右键单击您的项目选择属性,在属性窗口中选择 Android,在其中根据您的设备操作系统 API 级别选择项目构建目标。
例如,我有 Samsung Galaxy Fit - Android 2.2 os API Level - 8 所以我选择了 Google APIs, Google Inc, 2.2, 8 。
Let me know this is useful for you or not ?
让我知道这对你有用还是没用?