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
Related
Just to be clear, the device isn't locked or anything and it works perfectly for my friend who has the same android studio version. The problem isn't with detecting the usb device (by the computer), I can access the device's content just perfectly so it connects correctly to my computer but not to android studio.
When I try to run an application, the usb device doesn't show amongst the options.
Can someone please help me with this issue, knowing that my android studio is updated.
UPDATE:
the devices I used are: Samsung J2 and J3
Have you installed Universal USB Driver, if no then you will not see any device to connect. you can also install individual company device driver.
just try Universal USB Driver to connect all devices
Download from here Universal USB Driver
Open the Device Manager window from the control panel in your computer. In the Others/Unknown Devices tab you would see an unknown android device. Right click on it and update the driver and re-run android studio.
Make sure usb debugging is on in your device.
In Android Studio
Tools->Android->Enable ADB Integration
Enable ADB Integration
Then run app
Hope it will solve the problem
Enable your ADB in your Android
-> First go to Settings->Developer Options
-> Then On or Enable your ADB Mode
Just a Restart of Android Studio worked for me.
In my case it happened because of non-interaction in Android_Studio for long.
Else, Check with Run -> Edit Configurations -> Target.
I have the same problem and I use Samsung too.
I fixed it by installing the device driver from Samsung which you can download from Samsung's website
Note
You need to enable ADB mode(Like the second comment)
You need to set Target in Android Studio to > Open Select Deployment Target Dialog
to set Target : Run > Edit
Configurations > Targets > Open Select Deployment Target Dialog
I am having problem connecting my device(nexus 5) to the android studio.
Everytime I click the run button it says USB device not found even when I have connected my device to the laptop via usb and have installed the usb driver in the sdk manager.
please help
If you have Android device, here's how you can install and run your app:
Step 1:-Plug in your device to your development machine with a USB cable. If you're developing on Windows, you might need to install the appropriate USB driver for your device. For help installing drivers, see the OEM USB Drivers document.
Step 2:- Enable USB debugging on your device.
Note that,On most devices running Android 3.2 or older, you can find the option under Settings > Applications > Development.
note :- On Android 4.0 and newer, it's in Settings > Developer options.
Note: 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.
In order to debug over USB, set up your Nexus 5 for development by enabling USB debugging on your Android device:
Go to Settings > Developer options. On Android 4.2 and newer, the developer options are hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Just tap it 7 times, even if it seems crazy. Then, return to the previous screen to find Developer options.
In Developer options, confirm that USB debugging is checked.
Ref: https://developer.chrome.com/devtools/docs/remote-debugging
I am doing some applications using Android + Eclipse to run on tablets. I have had too much trouble with the tablet emulator, so I would like to try my code (apps) on a real tablet. How can I do this? I have a Samsung Galaxy Tab 3. Do I need to install the adt-bundle on it?
I'd appreciate any input.
http://developer.android.com/tools/device.html
You just need a usb cable to connect your device to your pc.Go to the above link for more info
check this it may help you Run on a Real Device
Here is a copy paste, but check the link it's really good and well explained :
If you have a real Android-powered device, here's how you can install and run your app:
1-Plug in your device to your development machine with a USB cable. If you're developing on Windows, you might need to install the appropriate USB driver for your device. For help installing drivers, see the OEM USB Drivers document.
2-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.
Note: 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.
To run the app from Eclipse:
1-Open one of your project's files and click Run from the toolbar.
2-In the Run as window that appears, select Android Application and click OK.
Eclipse installs the app on your connected device and starts it.
Or to run your app from a command line:
1-Change directories to the root of your Android project and execute:
ant debug
2- Make sure the Android SDK platform-tools/ directory is included in your PATH environment variable, then execute:
adb install bin/MyFirstApp-debug.apk
3-On your device, locate MyFirstActivity and open it.
I just want to test my android application in my Nexus 7 device in my mac.
I connect the Nexus 7 tablet to my mac through USB connection. While I try to run , its status is offine.
I also tried to run my android application in Windows machine. There I installed one driver for Nexus 7. Windows detect the Nexus and I can able to run my application in Nexus.
Is there any special driver needed for Mac?
Please provide me the best way t overcome the issue
several suggestions :
1. You have to authorize every machine you use since android 4.2
2. Check if you need to update your sdk.
You have to update to the proper API level and to usb driver (under extras -> Google usb driver). Then change the driver of your nexus 7 to the new one. You can find it at your android-sdk folder.
3. If that won't help you call to : 'adb devices' (Windows commend - I guess that it has to be the same at mac)
Did you check on your device:
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.
Note: 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.
I am using Eclipse on Mac with Android SDK. I have the emulator working with my code and today I borrowed an Android that I would like to test on.
I have run 'adb devices' from the command line, but I think the problem is more fundamental at the USB hardware detection level.
What tools do I use to troubleshoot this?
Enable USB debugging on your device.
On 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.
As stated by Dan .. 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 and then enable USB Debugging