I opened my NotepadCodeLab, NotepadAdv1 project, and got this as soon as I built and ran:
[2010-11-01 14:42:48 - DeviceMonitor]Sending jdwp tracking request failed!
[2010-11-01 14:42:48 - Logcat]device not found
com.android.ddmlib.AdbCommandRejectedException: device not found
at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:736)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:373)
at com.android.ddmlib.Device.executeShellCommand(Device.java:285)
at com.android.ddmuilib.logcat.LogPanel$3.run(LogPanel.java:516)
What am I missing?
Emulator or physical device? If emulator, is it already running? If it's a device, is it connected via USB?
Assuming you have the SDK installed and on your path, if you type "adb devices" into the command prompt, your device should show up. If it doesn't, follow the SDK installation instructions here:
http://developer.android.com/sdk/installing.html
If you're using a real device, don't forget the USB driver. You also have to have installed into your SDK and AVD manager the correct version for your phone. If you were upgraded to v2.2, also install v2.1.
Bizarrely, when I came back the next day (after restarting Eclipse/my computer), it worked. Should have tried that first. Thanks though :)
Related
I am trying to run react-native android app in my nexus5 emulator
adb devices
List of devices attached
emulator-5554 device
started packager react-native start
running app - react-native run-android
Installing APK 'app-debug.apk' on 'reactnative(AVD) - 6.0'
Unable to install examples/android/app/build/outputs/apk/app-debug.apk
com.android.ddmlib.InstallException: Failed to establish session
at com.android.ddmlib.Device.installPackages(Device.java:894)
at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:113)
at com.android.builder.testing.ConnectedDevice$installPackages$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at com.android.build.gradle.internal.tasks.InstallVariantTask.install(InstallVariantTask.groovy:119)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226)
For Mi devices
for those who suffer from this, try what lironess mentions in a Github Comment
enable developer mode - In your phone, go to Settings, About phone and click on MIUI version 7 times. You’ll see a pop up which
says you are a developer now.
Go back to Settings, Additional settings, Developer options and enable USB Debugging.
Connect your phone to your PC/Mac and on the phone authorize your computer
go back to Developer options, scroll down to find Turn on MIUI optimization and disable it. Your phone will be rebooted
Try it now :)
Try : react-native run-android --deviceId YOUR_ID.
adb is known to be flaky. Try:
Restarting adb with $ adb kill-server
Restarting the emulator
Using Genymotion instead of stock Google emulator.
For your AVD emulator settings, try to make sure the "Use Host GPU" setting is checked, and relaunch the emulator and try again.
In my case, I have to run this command in
/sdklocation/platform-tools/
adb kill-server
then run again and watch for install request on the phone.
hope this help some one
For those like me having this issue in the emulator, one more tip: try to free up the available storage space in the emulator. That worked for me.
So many test apps and previous developed apps installed XD
If your device or emulator have an application having same name with the application you are building. Just remove the old one. It will resolve the issue.
If you had already installed app on device go delete it. It's work for me
Simply go to developer options and enable Install via USB below Debugging options.
Even i had the same problem,but restarting the genymotion and running the "react-native run-android" again worked for me.
Ensure genymotion is running before running the above command.
Probable Cause
I faced this issue recently , I had first developed an app called
'myApp' in CordovaJS where the app domain was com.myapp and had it
installed (this was months before I got into react ). Then when I
switched to react-native I did an app with a domain com.myapp and ran
into the same problem you are in.
So I figured out that there was conflicts when it came to domain and source .
Solution :
Uninstall the app that has a similar domain as the one that you are
installing eg com.example , then reboot your phone .
It worked for me , I hope it works for you too.
01 - Uninstall the app installed in device
03- then run
adb kill-server
02 -Then run again
react-native run-android
This issue happens to occur in Xiomi devices. In developers option, you don't have to disable MIUI optimization(disabling this won't sync your accounts) instead, enable 'USB debugging' option along with 'Install via USB' and 'USB debugging(Security settings)'.
This will solve the issue :)
Sometimes it may happened due to insufficient storage within emulator.Try something like below:
1. Stop emulator
2. Open AVD Manager -> Wipe Data
3. Start emulator and run your project.
step :1 run(kill all adb)
adb kill-server
step 2:list all connected devices(get your emulator id)
adb devices
step 3:(replace ID to listed id from step2)
react-native run-android --deviceId ID
Note: make sure your previous app uninstalled in your emulator or physical device
In MI Devices. I solve this problem by goto Developer options -> turn on Install via USB. I hope it useful!
Hi I am trying to connect the Tizen Emulator version : 2.3.0 Rev2 to an android device.
I downloaded the files for apk files from here. I have done the port forwarding like shown below before starting the emulator :
adb -d forward tcp:8230 tcp:8230
But even after starting the Emaulator still the HostManagerForEmul shows status as disconnected.
I was following the complete instructions from the youtube video found here.
A couple things to try...
If Gear Manager is installed on the Android handset, uninstall it. Gear Manager is not compatible with HostManagerForEmul.
Restart sap-server from the emulator.
I have same problem, after struggling I have finally connected
Here is solution , Go to package manager install both highlighted from extension SDK as shown in picture
after installing connect android phone install apk provided in tutorial and run
adb -d forward tcp:8230 tcp:8230
Now delete emulator and make again, after reboot it will install extension tools and on first boot it will show like this
After that it will reboot again automatically , and on Android side it will show Connected. Done :)
I known there is lots of answers about this question, but still my mobile device not connected to eclipse IDE.
The following is what I already did:
1. restart adb or type command in cmd "adb kill-server/adb restart-server", eclipse find nothing in the devices.
2. execute netstat -aon|findstr "5037", finding there is only one process "adb" occupy the port
3. check the phone driver in device management, finding the phone is install correctly.
4. execute "adb devices":
List of devices attach
1f06cbba device
I thought may it's my phone's problem, so i remove it, and create a virtual device avd, the eclipse still don't work.
My Operating System is Windows 7 and Eclipse IDE Kepler.
can any body help me to successful run my first android helloworld?
Thanks a lot!!
additional explanation
debug mode is in phone is ON
adb is in the variable %path%(maybe some should answered)
try the latest adt-bunble in adroid website, it still don't work.
Try turning "developer options" on in your device. (Option you haven't tried).
To access these settings, open the Developer options in the system Settings. On Android 4.2 and higher, the Developer options screen 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.
Have you added adb in your class path variables? If not , you should append the class path with following paths :
path-to-sdk/android-sdk/platform-tools
path-to-sdk/android-sdk/tools
Try re-installing ADT Plugin. Worked for me last time.
Install your current mobile Adb USB driver and update Google USB driver
Check the MTP/PTP mode for your device:
http://lh3.ggpht.com/-8UMNs7Vg_dY/UVC6_6PnbDI/AAAAAAAAAIg/NjKOvAp9cDs/02-select-camera-ptp-mode_thumb%25255B1%25255D.png%3Fimgmax%3D800
In some devices you can find this under Settings->Storage->Menu Options(three vertical bullet squares).
When you say->the phone debug mode is open, i assume your developer options usb debugging is already enabled
I have been onto something in Android and it requires me to push some files in the adb. At first I pushed a file in the adb which worked fine but then after that as I tried to push other files in the adb it started to give me a device not found error. I tried killing the process both from the cmd and the Task Manager but it was of no help though after killing the server and again starting it the daemon is successfully loaded in port 5037. Though till now the project of mine works fine and the sdcard is read as I expect but I am hanged because no other files could be uploaded in the sdcard. :/
Thanks in Advance.
I had this happen with my Nexus 4.
I was following
http://developer.android.com/training/basics/firstapp/running-app.html
And I noticed that
C:\trythisworkspace>adb install bin\MyApp-debug.apk
error: device not found
error: device not found
error: device not found
- waiting for device -
^C
C:\trythisworkspace>
and
C:\trythisworkspace>adb devices
List of devices attached
C:\trythisworkspace>
So those are some symptoms for you
Go to device manager and see if like me you had a yellow exclamation mark
Download the google driver here and extract it
http://developer.android.com/sdk/win-usb.html
then go to the device with yellow exclamation mark and properties and update driver and...browse.. and point it to google_usb_driver\usb_driver
.
then it detected it and my device manager showed "Android composite ADB interface".
BTW, Android SDK manager has an option to install google usb drivers. it's possible it puts them in %userprofile%\AppData\Local\Android\android-sdk\extras\google\usb_driver
you could try pointing device manager to that if you find you have that directory.
I'm trying to install my test app on my device, but I does not go there.
I've also prepared my phones as described here: here
1 - In eclipse I see the device with '??????????' as ID.
2 - with adb device, I get:
List of devices attached
???????????? no permissions
I edited the /etc/udev/rules.d/51-android.rules....not sure what else to do?
3 - I copies the app to my SD card and tried to installed it from there ... but at a point the installation stopped and the message was 'Application not installed'
Also! The app gets intalled on my friends phone via eclipse?
Can anybody give me a hand with this???
Thanks!
Ensure your machine is connected to the Phone device correctly..
If the error persists, you can try restarting the adb server, using following commands:
adb kill-server
adb start-server
adb devices
If the error still persists, try restarting both your development machine and phone device.
I've seen that before when the user you are running as did not have permissions. If you're using Ubuntu try running adb via sudo:
sudo adb devices
If you're using another distro either try as root, or use sudo, accordingly. (Assuming you're using Linux, and probably Ubuntu, if you're in that part of the instructions on the page you linked -- but that info in the question would help too.)
Also make sure you're using the correct vendor ID for the device you're trying to use. The instructions show 0bb4 as an example only (that will only work for certain HTC devices). You can use the lsusb command to check to make sure you're device is detected by the OS, and get the correct ID.
lsusb
Bus 002 Device 100: ID 18d1:4e12 Google Inc. Nexus One Phone (Debug)
absolutely beyond my comprehension - the device got found (recognized) after deselecting the Settings > Applications > Development > USB debugging....
:) I signed with relief ...
Thank you very much for the enthusiasm and help!