Cannot Target Physical Devices - android

I cannot select either of my devices from the ADT device manager. This is a (nearly) fresh install of the ADT direct from Google. About a year ago I was using the Android plugin for Eclipse, but since that didn't work either I installed the ADT.
I have installed and updated everything under Tools, Android 4.2, and Extras in the Android SDK manager. I haven't installed anything else.
I have both a Nexus 7 (4.2.2) and a Samsung Fascinate (2.3.5) that I am trying to send my app to. I'm using the USB cable that shipped with my Nexus 7 to connect the devices to my computer. Both have USB Debugging checked.
I have not changed anything inside my test project, everything is as it was from just clicking next through the project builder.
I am using the default launch configuration, all the settings are default as well except for the Project. Here is the full console log from loading the ADT to after attempting to run on my device:
[2013-02-20 18:53:42 - test] ------------------------------
[2013-02-20 18:53:42 - test] Android Launch!
[2013-02-20 18:53:42 - test] adb is running normally.
[2013-02-20 18:53:42 - test] Performing com.example.test.MainActivity activity launch
[2013-02-20 18:53:42 - test] Failed to find an AVD compatible with target 'Android 4.2'.
[2013-02-20 18:54:42 - test] Performing com.example.test.MainActivity activity launch
[2013-02-20 18:54:45 - test] Launch canceled!
The 6th log entry occurs after the ADT gives me a dialog that says "No compatible targets were found. Do you wish to add a new Android Virtual Device?," to which I press no. The Android Device Chooser then appears, and there are no devices for me to pick from.
I have Googled that 5th log, but it turned up nothing that worked. They suggested that I change the minimum and target versions, or that I use a virtual device. I'd like to use my physical devices if possible. Thanks for any help.

Have you installed your OEM usb drivers? Have a look at this link:
http://developer.android.com/tools/extras/oem-usb.html

Related

'No active compatible AVD's or devices found

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:
[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?
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.
Seems like your device is not getting detected by the ADB.
Check if you have enabled USB debugging in 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.
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.
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.
Check out the image
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.
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.
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.
In androidmanifest.xml try to support the version from API level 8 onward
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
and even try to unable USB debugging in your mobile ..
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 ..,

Android emulator doesn't start anymore

I'm running on OSX Mountain Lion. I recently installed the latest version of Eclipse and the Android SDK from Eclipse. I updated the SDK through Eclipse as well, downloading everything in the Extras, Android 2.2 (API 8), Android 4.1.2 (API 16) and the Tools folder.
Finally I could run the emulator by creating a device but it was very slow (I have 250gb ssd hard drive + 16gb RAM), I couldn't even run the application I had. I tried to modify some options of the emulator and now apparently I can't run anything anymore. As soon as I try to run a program (Hello World) I get the following infamous Mac OSX error:
emulator-arm quit unexpectedly.
The console output for Eclipse is the following:
[2012-10-19 15:46:06 - test] Android Launch!
[2012-10-19 15:46:06 - test] adb is running normally.
[2012-10-19 15:46:06 - test] Performing com.example.test.MainActivity activity launch
[2012-10-19 15:46:06 - test] Automatic Target Mode: launching new emulator with compatible AVD 'test'
[2012-10-19 15:46:06 - test] Launching a new emulator with Virtual Device 'test'
I tried to reset things as they were before as well as creating a new emulator device. I tried to restart Eclipse and the machine itself but nothing. Apparently I can't run any Android application anymore.
Does somebody has some idea? I read on some similar thread to use adb to restart the thing, but apparently I can't get that running as well. By doing ./adb shell I get error: device not found. Do you have any idea about what can I do to solve the issue?
Thanks
The problem is essentially the AVD manager can’t re-open a virtual device that was on a second monitor on a Mac. The work around is to edit the following file
~/.android/avd/.avd/emulator-user.ini
(depending on your system, this may be at ~/.android/avd/Default.avd/emulator-user.ini too)
and change the window.x and window.y entries to
window.x=0
window.y=0
Source: http://timvoet.com/2013/01/04/avd-emulator-crashes-on-mac/
FWIW I noticed that running VirtualBox seems to get a lock on HAX which prevents android emulator window from ever opening. Closing VirtualBox seems to release the lock and everything works again.
Update your android sdk. In eclipse it should be an button next to the open avd manager button. or from command line try android update sdk --no-ui.
the following link should help scroll down to see how to update. https://wiki.appcelerator.org/display/guides/Installing+and+Updating+Android+SDK
I had the same problem but the suggested ideas didn't solve my problem, after swearing and waving my fist at the Gods, I worked backwards to when it WAS working, and decided to change my SDK Tools version back from the Android SDK Tools RC 22.6 to Android SDK Tools 22.3.
Start up emulator64-x86 4.4.2 intel atom instance and low and behold it works again.
2 valuable hours later... Gotta love working with Android. :O
Moral of the story don't use the Preview Channel Releases.

Eclipse: does not launch the app after installing .apk (android)

Recently after having updated lots of stuff on android SDK something happened to Eclipse.
I'm running the apps on an actual device instead of an emulator. Before the updates, after I used to click 'Run' and select my device, it would upload the .apk to the phone and immediately launch the app. For some reason, it doesn't do that anymore and simply stops after installing:
[2011-11-09 18:17:18 - helloworld] Android Launch!
[2011-11-09 18:17:18 - helloworld] adb is running normally.
[2011-11-09 18:17:18 - helloworld] Performing com.example.helloandroid.HelloAndroid activity launch
[2011-11-09 18:17:26 - helloworld] Device API version is 10 (Android 2.3.6)
[2011-11-09 18:17:26 - helloworld] Uploading helloworld.apk onto device '363294A87A1000EC'
[2011-11-09 18:17:26 - helloworld] Installing helloworld.apk...
The phone is on debugging mode and I generally haven't changed anything on Eclipse's settings - it literally stopped working after the SDK updates. Any idea how to make it automatically run the apps again?
Thanks
sorry for my bad english. I had the same problem after sdk updates. To solve this problem you have to update also "Android DDMS", "ADT" and all other components on eclipse. To do this open eclipse and click on "Help -> Check for updates". All android parts in eclipse will update automatically to the latest version (the version of SDK). I hope that this will work also for you. Bye.
Matteo
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Make sure these are in your manifest in the intent filter for your activity.
In Eclipse, Right click on Project > Runs As > Run Configurations > select Launch Default Activity under Android Tab.
Look in your "Run Configurations under the project context menu. Right click on your project and choose "Run As -> Run Configurations". Choose target tab and choose "Manual" for deployment Target Selection Mode. This will allow you to see what Eclipse should see when it is looking for a target. If your phone doesn't show, then you may have to configure something else.
You did not mention phone type.
Also verify your original Virtual Devices are still in AVD.

Eclipse with Android does not respond

I've installed Eclipse and the Android SDK but I just cant get to everything working properly. After 2 days I managed to create a working emulator that actually shows am Android interface (instead of a black screen with Android text), but I have absolutely no idea why it didnt work for the first two days. After that, I´ve had problems with the ADB and I also managed to fix that. And still my problems aren't over. I now have a problem with installing the sample APK files into my emulator, but I dont get any error messages, which makes it really hard to find a solution for.
I.e. I've loaded 2 different projects (bbbb and Snake) and after pressing run the emulator starts up. BUt then, nothing happens. I have copy-pasted an exert of the console below.
[2011-10-21 20:29:59 - bbbb] WARNING: Application does not specify an API level requirement!
[2011-10-21 20:29:59 - bbbb] Device API version is 14 (Android 4.0.1)
[2011-10-21 20:29:59 - bbbb] Uploading bbbb.apk onto device 'emulator-5554'
[2011-10-21 20:29:59 - bbbb] Installing bbbb.apk...
[2011-10-21 20:59:28 - Snake] ------------------------------
[2011-10-21 20:59:28 - Snake] Android Launch!
[2011-10-21 20:59:28 - Snake] adb is running normally.
[2011-10-21 20:59:28 - Snake] Performing com.example.android.snake.Snake activity launch
[2011-10-21 20:59:31 - Snake] WARNING: Application does not specify an API level requirement!
[2011-10-21 20:59:31 - Snake] Device API version is 14 (Android 4.0.1)
[2011-10-21 20:59:31 - Snake] Uploading Snake.apk onto device 'emulator-5554'
[2011-10-21 20:59:31 - Snake] Installing Snake.apk...
As you can see, the console just stops after the Installing .apk... line (and yes I have waited for 30 minutes just to be sure). Why don't I get a time-out or error message?
I really dont know what to do now. And I cant find any answers on this on the web. Can anyone please help me. I really want to start some actual programming instead of this. I am using Windows 7.
Your app does not specify a API level. Go to Window ----> Preferences and then android. Pick a API level.
Instead of starting with Snake.apk, you should try starting with the example project that is created when you create a new android project with eclipse.
Alternatively you can create a new project with the android command like this:
android create project --target 9 --name HelloWorld --path . --activity HelloWorld --package com.example.helloworld
After you've created this, make an emulator with version 2.3 (android 9) and try that.
I don't know if you should mess with android 14 yet if you aren't familiar with android at all given no device out yet has Ice cream sandwich yet so you won't be able to test with a real device until next month at least.
If you are planning to target honeycomb (tablet) devices you can start with version 13 and create an emulator for that. By the way, what are the specs like on your PC? It takes a pretty fast machine to run the emulator. The android emulator is notoriously slow.
Anyways, I'd start with the most basic of projects, which is the template project android creates for you when you start a new project.. Once that works you can continue with your own project.
create new AVD with 1.5 sdk version.
Try to start with minimum sdk version(1.5).and specify your minimum sdk version while creating project.
also make the emulator skin as qvga(smallest).

How to launch an android application in eclipse

So I've done the "Hello, World" tutorial on the android developer site. Instructions on how to launch the application:
1) Select Run > Run.
2) Select "Android Application".
Simple enough. Except what starts is the android default launcher, not the application. How do I get the actual application to start?
Code is a copy paste from: http://developer.android.com/resources/tutorials/hello-world.html
Edit: Haven't tried logcat yet, but the console gives me:
[2011-08-23 15:57:19 - HelloAndroid] Android Launch!
[2011-08-23 15:57:19 - HelloAndroid] adb is running normally.
[2011-08-23 15:57:19 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2011-08-23 15:57:19 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'MyPhone'
[2011-08-23 15:57:19 - HelloAndroid] Launching a new emulator with Virtual Device 'MyPhone'
Edit2: Apparently this is a known problem. The solution provided by google doesn't work for me, but might for someone else: http://developer.android.com/resources/faq/troubleshooting.html#eclipse
Edit3: I've found numerous people with the same problem, but no solutions so far. Workaround: use a physical device. The program runs fine on my Nexus One. I'm leaving the question for now, can't spend more time on this.
Right click to your project -> Run As -> Android Application
Right click on your project and select Run -> Run as -> Android Application.
Sometimes it doesn't start the application. You can launch the menu and you would see your application installed there. You can then manually launch the application.
Sometimes trying to run the application multiple times from Eclipse as well helps!
This may happen if another project (even a non Android project) is selected in your Eclipse workspace tree.
In that case, the Run command will be applied to this project even if a source file of HelloWord is opened on the edition screen.
Ensure that a source file of HelloWorld, or the project HelloWorld itself, is selected.
Or you may just need to unlock the Emulator that started.
When running the app from Eclipse, an emulator is started. But it appears locked. You have to unlock it to make the keyguard to disappear, as if it was an actual cellphone.

Categories

Resources