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 ..,
Related
I am new in android and trying to run a simple Hello world! program using android studio. I defined an AVD which is a Pixel device with API version 28 (Pie). When I run the program, the emulator gets up, but it doesn't load the application. I have tried following, but none of them worked:
Restarting avd server from command-line.
Changing skin to QVGA.
Creating a new emulator.
Setting graphics to software.
Any idea on the issue?
I think you do not enabled USB Debugging in your AVD.
Try this steps:
1- go to your AVD setting
2- System
3- About Device
4- Multiple Clicks on Build Number
5- Go back to setting
now you see Developer Options
6- goto developer options
7- check USB Debugging
Hope to be useful
Have you enabled USB debugging inside the emulator?
Before you create an Android emulator, you need to install an Android system image that your emulators can use.
Note: If you installed the Android SDK and NDK during RAD Studio installation, a valid Android system image (such as Android 4.2.2 API 17) should already be shown as Installed in the Android SDK Manager. In this case, you do not need to install another Android system image.
Still, if you are not able to run the emulator then try this Memu Emulator
This is a very small and simple emulator to use and install. It works perfectly on every pc.
I'm trying to write android applications with Qt5.1. I installed everything according to these instructions and I wrote my application and built it successfully. My problem is that when I click run on android version, instead of running the application on the device that I have connected or even asking whether I want to use the virtual device or physical device ( like eclipse does ) it just opens ADV.
I know I have connected my device properly because I can run applications I write with eclipse on my device. But not with Qt.
Can anybody help me?
Just in case you need to know I'm using the latest version of ndk and for sdk I'm using the one that comes with adt's latest version. If any other information I should provide please let me know.
thank you
I have had this problem as well, your device is not corresponding with the QT run settings. When you press run (probably in QT Creator?) it will search for devices which allow the application to run on.
There are a few possibilities when it comes to this:
Your device is not set up correctly:
run "adb start-server" and then "adb devices" in your command prompt. Does it say it found 1 device with status: "device"? If not your device probably doesn't have USB debugging enabled (you can enable this in the dev settings on your device).
You are building in the wrong mode:
Make sure you are creating a program for ARM (ARM GCC 4.7 QT 5.1 for example).
Deploying for the wrong API level:
Are you running the program on a device that supports API level 17 ? If not you can change these settings (API Level) in your QT project settings.
You don't have the recent API level installed:
Start the android sdk manager and download + install the new API's.
It worked for me after performing these steps, should you have any other difficulties feel free to ask!
Edit
If these steps did not work check if your android sdk is located in a location with write permission.
Is it possible to emulate an app with an external device in android studio? I have a device connected to the computer, but when you run the app it does not recognize the device.
Note: The mode and debugging mode to accept unknown sources are activated.
Go to the run configuration of your module and change that:
There you can choose weather you want to launch it in an emulator, device or if IntelliJ should ask you every time when you run it:
Try to install driver from Google - http://developer.android.com/sdk/win-usb.html
It helped for me
i had the same problems and i have been surfing the net for hours to figure what is wrong. In my case the solution was that Android Studio has a default targeted-API 16 and my Huawei runs android 4.0.4 which is API 15.
Change it in the AndroidManifest and it should run properly!!
android:targetSdkVersion="15"
Check driver for your portable device is installed or not. To do so,
Right click on My Computer or This Pc
Click on the properties
In the left, click device manager.
Now find out whether your device is connected properly under portable device section.
If not then try to install suitable driver for your device according your System.
I am having
target android-4
in project.properties. In eclipse when I run the project I am getting the error
No compatible targets were found
How to resolve this>
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.
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.
check this tutorial out for more info:
https://developer.android.com/tools/devices/managing-avds.html
Create AVD that supports android-4(Android 1.6) or change your android-4 target to android-8.
How to create new AVD ?
on Eclipse, [Window> Android AVD Manager] select,
you press the [new] button, you can create new Android Virtual Device
try to change the target android-4 to target android-15 in your project.properties and than refresh the project run again
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 )
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)
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 Debugging on your phone.
I have a Samsung Galaxy SIII and I enabled USB Debugging by going into Settings > Developer Options. Then check the USB Debugging option and allow your computer to install the necessary drivers when connected. Hope this helps!
If you are developing on Windows, to debug on a device, first you have to install the driver using these instructions here:
http://developer.android.com/tools/extras/oem-usb.html
You can find the driver in the ...\sdk\extras\google\usb_driver\ folder.
Then you will have to enable USB debugging on your device.
On most devices running Android 3.2 or older, you can find the option under Settings > Applications > Development.
On Android 4.0 and newer, it's in Settings > Developer options.
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.
Galaxy S4 users need to go to Settings > More button > About device
Next you have to tap Build number (greyed out) 7 times then you get an option in previous menu called Developer options, select this and then tick USB debugging
I have installed the Android SDK and plugin for Eclipse and written my first test app. I am trying to view the device in the DDMS section of Eclipse, but my Android Virtual Machine is usually not listed in the Devices section when it is running. Occasionally it will appear for a minute only to disappear again. I found an article recommending that I run adb kill-server to get it to restart and appear. This works about 50% of the time, but the device just disappears again in 10-60 seconds.
My main desire with this is to push some files to the sd card on my Android Virtual Machine, but the device doesn't stay visible long enough to push any data to it.
Thanks!
I have found that if my Android mobile is connected via USB then a running emulator may be hidden.
Alternatively, if you mean the devices list in Eclipse 'Run As' then it is possible the 'target version' of your android project in eclipse is set to a higher SDK version than the version of the emulator you would like to deploy to.
The 'target version' is set in 2 files, both of which can be viewed in the root of your eclipse project:
default.properties
AndroidManifest.xml
E.g. to include Android emulators from 1.6 upwards you should find the following in default.properties:
target=android-4
and the following in AndroidManifest.xml
<uses-sdk android:minSdkVersion="4"/>
To edit default.properties right-click the eclipse project/Properties/Android then select the lowest installed version of the Android SDK.
To edit AndroidManifest.xml double-click on the xml file and on the first tab set the 'Uses SDK' 'Min SDK version' to 4.
It happens to me from time to time. I just reopen the emulator and it works.
If the AVD disappears very fast I would try pushing files using adb.
adb push <local> <remote> - copy file/dir to device
I had similar problems with Eclipse launching my AVD's but them coming up disabled or offline. In Linux, I could see the process running, and "ADB Devices" reported that they were there, but offline. I would sometimes need to launch the AVD from the AVD Manager and select "clear user data". It would take a couple of rounds of this before my AVD would launch correctly, but the problem always returned. Something in my code was causing the AVD to get into a bad state and prevent it from launching cleanly.
I have since created a new project and started a new version of my app, and the problem has not returned.
Best I can come up with is to restart the adb server with adb kill-server; adb start-server . Blog post