Android Studio wear app installation fails - android

So I've got a project with a mobile and a wear part. Actually, it's the default Basic Activity and Basic Wear Activity project, targeting API 21 on the phone and the latest 7.1.1 for watches. My watch (OG LG Urbane on AW2.0) is plugged in with ADB debugging enabled.
The watch shows up in the list of ADB devices, but when I try to run the 'wear' project on it, I get the following error:
device '506KPQJ0130548' not found com.android.ddmlib.AdbCommandRejectedException: device '506KPQJ0130548' not found at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:862) at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:451) at com.android.ddmlib.SplitApkInstaller.uploadApk(SplitApkInstaller.java:152) at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:78) at com.android.ddmlib.Device.installPackages(Device.java:904) at com.android.tools.idea.run.tasks.SplitApkDeployTask$SplitApkInstaller.installApp(SplitApkDeployTask.java:117) at com.android.tools.idea.run.RetryingInstaller.install(RetryingInstaller.java:86) at com.android.tools.idea.run.tasks.SplitApkDeployTask.perform(SplitApkDeployTask.java:86) at com.android.tools.idea.run.LaunchTaskRunner.run(LaunchTaskRunner.java:120) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.Core... (a minute ago)
The watch then disappears from ADB for a few seconds, like something crashes.

Okay, what it turns out is that there is some incompatibility with USB 3.0 in the cable, charger or watch. When I use another port, there's no problem.
That's really annoying though, all my computer's USB 2 ports are on the back so my watch has to sit in a very awkward location where I can't really test it without going under the desk. You wouldn't think that would be an issue with a modern device, but probably LG's fault.

Related

Android device suddenly not found

I am working at an android studio project and I always work with my own physical device SAMSUNG S7. It always worked (for a few weeks now) but today suddenly from one moment to the other my device cant be recognized by android studio anymore. I didnt change any settings! I just changed a line in the code (like a hundred times before) and after it my device is not shown in the list of devices. There is only the virtual device which is useless for me because it never displays the app correctly. Just my physical device shows the app correctly so now I need help. Otherwise I cannot continue programming.
I tried to reopen android studio and restart my phone but it didnt help.
Changing the cable plug mode (credits to Hack06)
Just swipe down the OS status bar, and tap on the device, then choose another connection mode.
Installing Samsung's development drivers
When this doesn't work, try installing the drivers provided by Samsung to improve developments. These can be found here.
USB Debugging
USB debugging may have failed. Or all of the developer settings have been reset. Try that
Reboot your phone into ODIN mode
Caution:
ODIN mode is in charge for flashing your Android phone, and if you’re not careful, you can cause permanent damage to your phone.
This solution applies only to Samsung’s devices, since they are the only devices with access to ODIN mode.
A guide how to access ODIN mode for your phone can be found here.
Install KIES software
If nothing worked till here you might want to download KIES software.
KIES software only works for Samsung’s devices.
Samsung KIES is part of Samsung Smart Switch.
Download here.
Google - Android USB Driver
My last suggestion would be to install Google's Android USB drivers. An official guide can be found here.
This may sound obvious..
but sometimes it could be a cable issue
even if it's charging it could not transfer data
try a new cable

Pixel 2 XL will not connect to PC for Android Studio Debugging

I am trying to create a React-Native app and I need to connect my device to troubleshoot some issues that only occur on the physical device and not the simulator. For some reason I have never been able to connect my Pixel 2 XL to my PC. I am running Windows 10 and I have tried all of the following.
Enabling developer mode and USB Debugging on my device.
Uplugging and replugging my device 20+ times in a row.
Changing the USB port I am using.
Changing the USB connectivity settings in Developer Options > Default USB Configuration. (Options are: File Transfer, USB tethering, MIDI, PTP, No data transfer) I've tried them all.
Restarting my device while it's plugged in
Downloading the Google USB Driver (in Android Studio).
Restarting my PC when the device is plugged in.
Updating my PC, and updating my device.
Checking Device Manager and trying to update the driver. (So the device used to show up with the yellow warning triangle next to it and trying to update the driver never worked. But now, the device doesn't even show up in Device Manager anymore)
Factory Reset my phone.
Downloaded Media Feature Pack for N and KN versions of Windows 10 (Suggested by the google tech support)(I called them)
I feel like I've tried everything previously addressed in every Stack Overflow question on this issue.
Finally solved the issue. The data cable was the problem. If you have tried all the steps above, and nothing is working, buy a new cable. This one works great and seems very durable for my Pixel 2 X: https://www.amazon.com/gp/product/B01N4OKUB8/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
I had this issue too - my Google Pixel 2 XL is about 9 months old. Was developing an app, so using USB debugging to debug the app as I built it. One day it mysteriously stopped working, though no issues with charging. I tried everything, including using all the different USB ports on my laptop, with no luck.
I eventually gave up and started using the emulator on Android Studio, and since I didn't need data transfer for anything else, I didn't send my phone for repair or anything.
A few weeks later it just started working again, all by itself...
I don't think I did anything to fix it - the moral of the story is, if you don't need it urgently, there's a chance it might just decide to work again!

Remote Debugging Chrome on Android issue

I am have issues using the remote debugging feature of the Chrome Developers tools with my Android device (LG Nitro running Android version 4.0.4). It was working perfectly several days ago but now my device never appears on the about:inspect page.
I have followed and carefully considered these instructions including the troubleshooting tips. I have also searched for the answer to my problem but have not been able to find anything that works.
I am using Chrome version 35.0.1916.141 on my Android device and version 35.0.1916.114 on my PC (Windows 7). Neither says any updates are available.
Please note:
I have enabled debugging on my Android device and the small bug icon appears in the menu bar at the top of the screen when the USB cable is connected.
I have installed the necessary drivers for my phone on my PC.
Chrome is open on both devices
"Discover USB devices" is checked
I have tried restarting both the computer and my phone several times
The only thing I have changed on my computer since the last time it was working was to download 64-bit Java. Could this have any effect? If anyone has any input or ideas, it would be much appreciated!
Sounds like you may have gotten lucky. Next time this happens, try this:
1) Unplug your device.
2) Revoke USB debugging in the Developer Tools.
3) In the command line:
adb kill-server
adb start-server
Plug in device and accept fingerprint.
Voila, it appears in Chrome again. I went through a lot of pain with random problems with my Galaxy S5 not showing up, I was pulling my hair out for hours trying to figure it out.
Update: After launching my Android application from Eclipse on my device, it suddenly showed up on the about:inspect page. I am not sure why it was not recognizing my phone before but it seems to be working now.

Titanium can't find my Android Nexus device

Hi I'm trying to compile a Titanium Android app directly on my Nexus 7 (2013, SDK 4.3) device but I can't see any 'Titanium on Android Device' option in the Run Configurations.
My device is in Developer mode, connected to the USB, detected by Android File Transfer (Mac OS X 10.9, Titanium 3.1.4), detected by adb...
I tried to restart adb, restart Titanium, plug and unplug the device, but I still cannot see the option.
I also tested all this with Titanium 3.1.3, with no success.
I have no clue of what's happening :/ any help would be appreciated. thanks
It may sound stupid, but my friend had similar problems with his Nexus and he changed the USB slot to which he plugged his device and it worked.
Try using a different cable. Most cables are only able to load the device, somehow. Not every micro-USB-cable is capable of sending data, correctly.
Again a reason why I don´t like to work in the android environment. No one checks whether software and hardware is working the way it´s supposed to. That´s why I love Apples restrictive "closed" system. No 1000 viruses and other crap.
Well, that was a bit confusing but I finally found such option inside a Project Explorer menu...

Android device keeps disconnecting from adb / eclipse

So I've read nearly every stack overflow answer about this issue, but still no solution. My device keeps getting disconnected. I've switched through 12 wires, I've tried every USB port; nothing. Eclipse keeps dropping the connection. It happens most often when I enter debug mode. Has anyone found a solution to this? Is this a bug in the new update? Seriously, this makes debugging and testing so painful. It slows down my testing by at least 3 times. There has to be a better solution.
First thing I tend to try is the following commands in cmd/terminal
adb kill-server
adb start-server
And lastly,
adb devices
To check the device is connected.
Following that I'd try restarting the device, and perhaps as a last resort uninstall/reinstall it's drivers.
Edit: also, do you have access to another device? In the past I've had issues with specific devices constantly dropping out.
I experience that when my nexus7 2012 kept disconnecting; root cause was the USB3 connection.
Changing to a USB2 port fixed my issues; can you try switching to a lower speed port?
I was having a very similar problem but using Android Studio on OS X. By default Android Studio points to an SDK inside it's application bundle so I changed the SDK location setting to point to another version of the Android SDK I had downloaded manually and this seems to have fixed the disconnection issues I was having.
Instructions for changing the SDK location setting can be found in this answer.
My connected device (an Acer) was working a treat until I rebooted my mac. After the reboot, Eclipse dropped the connection every single time I ran the app. I tried two cables and every port in my iMac but nothing worked. I had to disconnect and reconnect the device for every run (a real pain when debugging!).
What worked for me was to run the app. When the window appeared to choose the device to run on (which was empty), I disconnected then reconnected the device, but before clicking to run, I checked the box (bottom left) to use this device for each run. It now runs every time directly on the device.
a unpowered usb hub did fix the problem for me. it was happening on both my samsung s6 and my sony z5 premium.and both on my pc and my mac. (using android studio).
Use short usb cable. The shorter the length of cable, the more stable the adb connection. I had the same problem for long time. I changed the cable to shorter one and I haven't got that problem anymore.

Categories

Resources