I'm struggling with an issue connecting Android Studio to my Google Pixel 2.
When I plug my phone into my laptop, Android Studio now recognizes the physical device and shows 'Google Pixel 2' in the dropdown of devices to run the app on. When I go to run the app, it compiles without error but when it tries to install the app on my phone the connection between my phone and AS is lost (the device is no longer listed in the dropdown) and this error message is shown in the Run dialog:
06/12 17:08:35: Launching 'app' on Google Pixel 2.
Installation did not succeed.
The application could not be installed.
List of apks:
[0] '/home/kirk/Apps/xxxx/android/app/build/outputs/apk/debug/app-debug.apk'
Installation failed due to: 'device 'xxxxxxxx' not found'
Retry
Clicking the Retry link just results in it being launched in an emulator.
I've tried disconnecting and reconnecting the device, revoking the USB debugging authorisations then re-trusting my computer, as well as closing and re-opening Android Studio.
Any ideas?
Android Studio–>Preferences–>Build,Execution,Deployment–>Debugger–>“Use libusb backend”, select false–>Apply–>Ok
Sometimes ADB just need a restart.
adb kill-server
adb start-server
In my case I had a plugin to connect via wifi, like:
Android WIFI ADB
Try to uninstall this type of plugin then clean Android Studio on Invalidate Caches / Restart...
This happened to me when I was sharing Wi-Fi from my PC to the phone.
When I disconnected my phone from my PC's Wi-Fi, everything worked.
It could be an issue with ADB rather than Android Studio
I think it is problem with adb not with android studio I tried updating adb it worked for me. Try once
Related
In android studio 3.6.3
This error indicates when I click on the Run button to install the program on the emulator.
Installation did not succeed. The application could not be installed.
Installation failed due to: 'device offline'
After a lot of searching, I found out that the adb had a problem and the emulator was turned off incorrectly.
I entered these commands in the cmd and the above error was fixed.
adb kill-server
adb start-server
adb connect [192.168.162.101]:5555
adb devices
List of devices attached [192.168.162.101]:5555 device
NOTE
This IP is 192.168.162.101, which has an emulator itself. If you want to run the emulator manually, you must get your emulator IP and replace it with 192.168.162.101, otherwise it should automatically follow. Implement the first two commands of the emulator on the adb
I was using the emulator. I just close the Android Studio and then opened it again. The issue was resolved.
Disconnect your phone and connect again. This was worked for me.
i recently updated my android studio after update connected devices are not showing to run the project.(developer options and usb debugging mode all are fine of device side). how can i fix it?
Try to restart adb using terminal, Connect your device and type
"adb devices" command
it will restart adb and ask for the permission in phone
I am using Android studio 3.4.1, In which my projects are not running in real device. but not having any problem in emulator.
After connecting the usb and i have run the app. then getting this error. after that device is not even listed in the available devices.
error got in logs:
Installation did not succeed.
The application could not be installed.
Installation failed due to: 'device '711KPMZ0603459' not found'
Retry
Retry also not working.
I also tried in Android studio Beta 1 and Beta 3. same problem happening.
can any one help me in this?
FYKI:
1. USB debugging enabled.
Tried USB option for File Transfer, USB tethering, No data transfer.
Tried with different cable as well.
Problem identified only after updating 3.4.1 android studio. Also facing in 3.5 Beta 1 and Beta 3.
Same kind of problem already added in Issue Tracker. https://issuetracker.google.com/issues/122892907
Kill and Restart the adb manually through Terminal using below comments. use cd to go inside platform-tools under Android sdk folder.
./adb kill-server
./adb start-server
PS: Before posting this questing here, i already tried quitting the adb in Activity Monitor (which can be opened from spot light)
Activate USB-Debugging in Developer Options and set your USB options from Charge phone to transmit Data.
Well the mark of your phone is important because in my case i use LG G5 and i could not see my device even after turning on developer mode and enabling debugger options.
I don't know the type of phone you use but you can try my solution.
After turning on USB debugging, go to tethering under the networks sections and turn on USB tethering then try again.
Hope It helps!
My device is running android Lollipop 5.1 with Developers Options enabled and USB Debugging option checked. When I hit the RUN button on Android Studio it shows the following in the event log:
Target device: qmobile-lt500-D5180B1R63091071
Installing APK: C:\Users\Umair\AndroidStudioProjects\MyApplication\app\build\outputs\apk\app-debug.apk
Uploading file to: /data/local/tmp/com.example.umair.myapplication
Installing com.example.umair.myapplication
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.umair.myapplication"
And then nothing happens. App doesn't install and open. When I click on Android Monitor, it shows events on logcat, my device name etc. confirming that it is properly connected.
Someone tell me where the problem is.
In your mobile check unknowns sources apk install on/off
And make sure in your device space is available
First uninstall app from your device if you've already installed it.
Then in your IDE do clean and rebuild,and try restarting the device and also restarting your IDE.
That should work as expected now
I want to use android on eclipse on Windows. I have installed Kies3 and my driver is updated. I enable USB debugging and the API of the project is the same as my devide version.
But when I want to run the project In android device chooser I get Target unknown. State offline and SerialNumber nnnnnnnnnnnnnnnn which is very strange.
Could you help me that when can the problem be?
Try the following methods:
Go to cmd, type adb kill-server and adb start-server;
Reboot your phone.
Restart Eclipse.