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:
"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.
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.
Is there a way to force an application using Google apis, to be launched on the attached device without showing the Android Device Chooser?
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.
This is an irritating acknowledged defect (Issue 11373) reported on the Android Issue tracker.
The Issue has status Assigned and presumably will be fixed.
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.
Good luck.
Mark
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 .
Let me know this is useful for you or not ?
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.
Related
attempting to run the saferoom demo running against an emulator defined as Pie (API 28). using android studio 3.4 on a Lenovo Windows 10 Professional system. sdk for API 28 is being used.
At open the app shows the message "You do not have a secure keyguard!" as a long toast on the emulated screen.
How is this corrected?
no change to the code from Github clone.
resolved by opening settings in the emulator and setting a pin number for log on to the emulator. However - each time the emulator is restarted, the settings need to be changed again. Maybe there is a way to control this in code or some setting in android studio?
What I meant by "the settings need to be changed again" was a mistake. Once set up with a pin, the emulator does retain the pin across restarts. The app itself asks for the pin. Apparently pin, password, or fingerprint must be set up through the settings app in the emulator at least once in order for the emulator to have a secure keyguard. for my app, requesting the pin at startup is a good thing.
Thanks for the question. it helped clarify things for me.
I'm a MAC user and I bought this phone specifically for app testing. The instructions for setting it up (link provided) only get me so far because there's no select option on this particular phone explicitly called "build number" in the settings which I'm supposed to tap to open developer options.
https://developer.android.com/training/basics/firstapp/running-app.html#RealDevice
Perhaps this can be of help:
https://android.stackexchange.com/a/55891
Back in Android 2.3, you just need to go to Settings - Applications - Development.
I'm new to the Android OS and I am having trouble interacting with a virtual device. I've installed the Android SDK + Java + Eclipse and I'm trying to get a virtual device running and debug an apk I have.
I create a AVD and start it up and get this basic screen below but none of the other Android OS options you'd see on a standard phone. I can't even really control this device as the buttons seem to have no effect. I can't get into settings or see default installed applications, etc..
What am I doing wrong? I'd expect to have a basic clean Android OS startup when I launch these virtual devices but I get this funky screen and can't do anything with it, controls don't seem to work.
Worth noting I am doing this from a VMWare Workstation running Windows 2012 R2, not sure if there are issues if I'm running this all in a VM.
UPDATE:
OK so it appears I was using the Android 4.4W which I think is for wearable devices and why the OS was basically empty. I changed it to Android 4.4.2 x86 by cloning a Nexus 5 and now I just get a blank screen when I try to start the emulator. Here is a screenshot, any ideas?
Update:
You are using Android Wear API target, please try with regular android API (L preview or API 19 or below). I was able to reproduce your issue if i used Android Wear Target, it works if i used non-wear target. Android wear target is for 'wear' device types.
When configuring the AVD, you can pick different "skins" , please see below highlighted in redbox
If you are using a custom (or vendor) defined device type, go into AVD Manager -> Device Definitions and double-click your device entry, it will open the below window, make sure Buttons tab says Software
You can also navigate the emulator UI with keyboard shortcuts, often quicker this way.**
A. Ashoke is right about using skins, you may choose a skin when you create or edit the emulator. Here is a screen-shot. Check the 'skin' dropdown. (It may not be available for some 'devices' you select here.
You are using VMWare, so you might be behind a proxy. You may need to provide proxy, using following steps -
Click on Menu
Click on Settings
Click on Wireless & Networks
Go to Mobile Networks
Go to Access Point Names
Here you will Telkila Internet, click on it.
In the Edit access point section, input the "proxy" and "port"
Also provide the Username and Password, rest of the fields leave them blank.
When you will load it for the first time, it may again ask for your credentials. So provide there as well.
Eclipse is not detecting my phone. It's a Samsung Galaxy S2 HD LTE, Android version 4.0.4. Working in Windows 7. I have enabled USB debugging and updated the driver for it, but when I go into Eclipse Run --> Run Configurations --> Target it is not listed.
Not sure if this is relevant but I heard in another thread that the build target for your project has to be <= to the version of your device. If this is the case, all the options here are higher and there doesn't seem to be a way to add another so I'm not sure what to do. Also checked the manifest file to see what the min SDK is. It's 8 (which corresponds to android version 2.2) so that is fine.
I'm wondering if it has to do with "Android" being listed under Other Devices in the Device Manager (as per image below). I'm not even sure what this is. The phone itself says it's already updated, but when I try to update Android it can't find the driver software.
Another issue could be that when I connect the phone to my PC, it lists it as a camera instead of a mobile device, and displays the message "Connected as a camera" on the phone itself. The first time I connected, it also showed some error message about how device was not installed properly, but I haven't seen this message again and so not sure what to do about that, or that stupid Autoplay window that pops up every time I connect.
If you have any ideas please let me know!
Check if your Android Composite ADB Interface is correctly installed.
You can refer OEM USB Drivers and Debugging on real device for more details.
I realize this has been asked before but none have been able to help me, I want to use my Nexus 7 with my pre-existing Android project but when I attempt to use it Eclipse doesn't pick up it's target.
-I've updated my related drivers.
-The Android composite ADB interface is up to date.
-It works on the device I was previously using (HTC Desire S).
UPDATE
It does not pick up the target when Iconnect it as PTP and MTP + in both it registers the state as offline.
the most common reasons for the device not showing up as a target.
1) "Eclipse needs to be restarted".
2) the driver for the device is not installed properly.
3) the target api/version code is not compatible
try
1) to plug the phone into a different usb port. (that sometimes refreshes the driver)
2) create a empty project that is compatible with your android version and see if it picks
up your device (if it does that means you have to update the targetSdk for your project).
if all fails restart eclipse a few times and keep your fingers crossed.
Follow this tutorial.
If you like playing around with your Android device (e.g. rooting or installing custom ROMs), then you probably are familiar with Android’s ‘USB debugging mode’. However, USB debugging mode is really intended only for developers and people who don’t know what they are doing may accidentally enable it and put their device at risk. This is why starting in Android 4.2 Jelly Bean, Google has hidden the ability to enable USB debugging mode. If you want to know how to enable USB debugging mode in Android 4.2 and higher, this guide will show you exactly how to do that.
The following steps work on all Android devices running Android 4.2 and higher. That includes Nexus 4, Nexus 10, Nexus 7, Galaxy Nexus, and any other device.
How to find and turn on USB debugging mode in Android 4.2 and higher
To see the option for USB debugging mode in Android 4.2 or higher, do the following:
Open up your device’s “Settings”. This can be done by pressing the Menu button while on your home screen and tapping “System settings”
Now scroll to the bottom and tap “About phone” or “About tablet”.
At the “About” screen, scroll to the bottom and tap on “Build number” seven times.
Make sure you tap seven times. If you see a “You are now a developer!” message pop up, then you know you have done it correctly.
Done! By tapping on “Build number” seven times, you have unlocked USB debugging mode on Android 4.2 and higher. You can now enable/disable it whenever you desire by going to “Settings” -> “Developer Options” -> “Debugging” ->” USB debugging”.
Conclusion
That was easy. The best part is you only have to do the tap-build-number-seven-times once. After you do it once, USB debugging has been unlocked and you can enable or disable at your leisure.
If you alrady done,
Check if this solution helps Not seeing Nexus7 in Eclipse's Android Devices