Reputation:
I'm having trouble getting an Android app that I developed working on my phone. (Android Studio
on Windows 7
trying to run the app on Samsung Note 3
running Android 5.0
)
Here's what I've done so far:
USB debugging
and allowed unknown sources
Google USB Driver
updating the driver
for the phone but no updates were availabledebugging
in the build.gradle
fileand yet it is still returning Error running app: No target device found
I have also tried the dialog option for when I run the app but that says No USB devices or running emulators detected
Is there anything I have missed?
Thanks in advance!
Upvotes: 34
Views: 111331
Reputation: 27
I am using Android Studio Koala | 2024.1.1 on Apple M1 Pro Sonoma OS. I have this issue often. I have to kill adb and restart it.
Steps:
killall adb
.adb start-server
It worked for me. I have seen a couple of issues with adb recently.
Upvotes: 0
Reputation: 1862
In my case that was because of Platform-Tools. I updated that and solved. path:
File | Settings | Appearance & Behavior | System Settings | Android SDK -> Android SDK Platform-Tools.
If you have problem with update, remove it from SDK folder manually and then install it again.
Upvotes: 0
Reputation: 11
(For those who don't find "Deployment target option" )
1.Go to Navigation bar
2.Device explorer
3.Select Device explorer
4.Re-plug USB (There will be a lot of files from your device )
5.After a while run the app
Hopefully this will work
Upvotes: 1
Reputation: 1
I was stuck in a similar problem. Following the User Guide I was finally able to solve the issue by downloading and installing the Android SDK Platform-Tools from SDK Manager.
Upvotes: 0
Reputation: 59
I also got the same problem, so i goto the project folder and deleted .gradle , .idea and build folder from there and and them open the project again in android studio and clean and rebuild the project and it worked for me.
Upvotes: 1
Reputation: 31
For those who have tried all of the above as I did, to no avail, you can also force kill the adb.exe in task manager. I had over 40 tries to force close. After that, I restarted the adb to run my app and BOOM. Everything was cool again.
Upvotes: 3
Reputation: 10478
On the phone
Have you enabled Developer Mode?
Have you enabled USB debugging within the Developer Tools menu in settings (this menu doesn't appear unless you've enabled Developer Mode)
Do you have a good and securely connected USB cable?
In Android Studio
In Edit Run/Debug Configurations, do you have "Target: USB Device"?
It seems to help me to press the "Attach debugger to Android process" icon (a tall rectangle with a green beetle) and cancelling before pressing the "Debug app" icon
In Windows
It's helpful to know whether your phone appears as a recognised device. If you navigate to "ThisPC", (a level above C:), do you see it there?
Joel Gritter said he solved this issue by downloading the latest official Samsung ADB, see his answer.
Upvotes: 6
Reputation: 570
Upvotes: 57
Reputation:
I ended up downloading the official Samsung ADB from here: http://developer.samsung.com/technical-doc/view.do?v=T000000117
And it worked great after that. Thanks everyone!
Upvotes: 5