Now i know that this question has already been asked before. But I ve tried all of the solutions provided there.
Suddenly eclipse got hung and continuously showing DDMS post create init in progress bar.
I've tried deleting .lock file, cleaning eclipse, closing eclipse, killing adb.exe, re installing sdk.
Is there any other possible solution to resolve this issue. I am dead stuck. Please help!!
My configuration: Win 7 (64 bit) + Eclipse Juno + Java 1.6
This just worked for me (I've been dealing with the same issue off and on for a while now)
Close eclipse if you already have it open.
make sure all adb.exe processes are killed using task manager
launch a cmd shell
in the shell, run:
set ADB_TRACE=1
adb devices
launch eclipse
Notes for step 4 -
I first tried this without ADB_TRACE=1 and my adb process froze before listing any devices. Why it works with ADB_TRACE debug output is beyond me, but it seems much more consistent with it enabled. Note: many adb commands start the adb.exe service, keep that in mind in case you need to kill it again.
Notes for step 5 -
Because the command adb devices started the adb service, eclipse attaches to that non-hanging service. If you are still having trouble, try all the steps again but this time launch eclipse with administrator privleges.
Hope this works for you!
For me, the cause of the problem was that adb default port, 5037, was in use.
You can check that with
netstat -a -o | find "LISTENING"
where last column is PID.
Related
I am making a android studio project and I try to debug my application.
Running the application works fine, but when I try to debug it I get this error:
Could not connect to remote process. Aborting debug session.
What can I do to fix the issue?
You need to restart the ADB.
kill adb.exe process.
how to restart ADB manually from Android Studio
Sometimes this happens when two Android-capable IDEs are opened, e.g. Android Studio and IDEA. Shutdown one of the two (or disable Android plugin in IDEA) helps.
In My case,
For some reason I disabled Instant run and it has changed the Launch value from "Default Activity" to "Nothing" in "Run/Debug configurations". So always it says "Could not connect to remote process. Aborting debug session" and I was not able to debug. I enabled Instant and changed the Launch value from "Nothing" to "Default Activity" in "Run/Debug configurations" and it worked. Hope this will help some one.
(to get Run/Debug configurations, click "app" drop down and click Edit Configurations)
Check if you have selected the right Build Variant, usually "release" comes with debuggable false
Example:
buildTypes {
release {
debuggable false
....
}
}
is not recommendable change release to debuggable true, just change the right variant
debug {
debuggable true
....
}
Verify on AndroidManifest that your LAUNCHER activity has:
android:exported="true"
I try invalidate cache / restart and it's work
In command line :
adb kill-server && adb start-server
This command will restart ADB
+1 to Kuzneц's answer.
When Intellij and Android Studio are both open, apparently the Android plugin in Intellij needs to be disabled. This wasn't always the case but it resolve the issue for me.
Mac OSX 12.2.1
IntelliJ 2021.3.1
Android Studio 2021.1.1 Patch 2
By default Android Studio builds the debug version of the application. However, during the publishing phase you may have switched to the release one as the tutorial suggests.
ADB won't be able to attach to the application unless you revert to the debug configuration or you allow to the debug the release one.
If nothing of this works, you may resort in restarting ADB as explianed in How to restart ADB manually from Android Studio
Revert to debug configuration
Choose Build->Select Build Variant
Pick up debug in the second column
Deploy the application again
Allow the release version to be debugged
Select your application node in the tree
Right click and choose Open Module Settings (or hit F4)
Select Build Variants on the left
Choose release on the right
Set debuggable to true
Apply and deploy the application
Keep in mind that your life won't be easy as your application may be optimized and therefore not debugger friendly (e.g. you might not be able to step in certain methods, or view some local variables).
Restarted the ABD server. First the device had to be connected. Look for the "Assistant" tab in android studio (on the right side it usually is), and press next until you see the option to reset the ABD server.
I did
--->adb kill-server && adb start-server
--->invalidate cache / restart
but not work yet
Waiting for application to come online: com.example.distribution_system | com.example.distribution_system.test
Waiting for application to come online: com.example.distribution_system | com.example.distribution_system.test
Waiting for application to come online: com.example.distribution_system | com.example.distribution_system.test
Could not connect to remote process. Aborting debug session.
image1:--> [1]: https://i.stack.imgur.com/HZF5D.png
image2:--> [2]: https://i.stack.imgur.com/hrE4a.png
I got this error message when the phone was connected both via wi-fi (using "adb tcpip 5555" and "adb connect 192.168.0.100:5555" commands) and via a usb cable. Disconnecting the USB cable resolved the issue.
The other solutions posted here did not help me. I eventually discovered that creating a new simulator instance (tools->AVD Manager->Create virtual device) solved my problem. I was unable to get the previous simulator working again.
I followed all the recommendations above, but the problem was solved only after I used the Generate Signed Bundle and selected the desired flavor
For me the problem was a wrong launch flag set in the Run/Debug Configurations. I found out about this by taking the adb command that is executed to launch the app, which can be found in the "Run" tab. The command looks like this:
adb shell am start -n "com.your.package...." -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
By executing the command manually in the terminal, i got an error message which pointed me to the problem.
All solution didn't fix my issue, If you face it same me try that solution
enter link description here
This question is already many times asked but nothing its like my problem.
I don't get it why its not booting up or starting my apk.
Its stuck right there. Nothing is happening just the waiting for target device respond is coming up.
Everything worked perfectly until now.
I even reinstalled it. Didn't help much
PC SPECS:
i7 Core 2.2 GHZ
16GB RAM
Intel Iris Pro 1500MB
Android Studio 2.3
Error while waiting for device: Timed out after 300seconds waiting for emulator to come online.
Still the same error.....
I got it to work with changing the auto graphics to software!
I ran the commands that Jamal Eason recommended in the comments:
$ cd Android/Sdk/emulator
$ ./emulator -list-avds
$ ./emulator -avd [AVD_NAME]
I got some libGL error: unable to load driver: i965_dri.so errors when trying to run the AVD.
I was able to find this thread, where a user was able to fix a very similar issue by renaming the libstdc++.so.6 inside the emulator directory and linking the libstdc++.so.6 from the /usr/ directory.
$ cd Android/Sdk/emulator/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib64/libstdc++.so.6 /home/user/Android/Sdk/emulator/lib64/libstdc++
I wasted some time with the same problem, for me after all, the solution was to power off my vagrant machine, this means that if you have a virtual machine running, is not allowing the AVD to run. So if that's the case, just power off the VM's and try again.
Hope this helps :).
I was experiencing the same exact issue, so I ran the commands suggested by Jamal Eason, and I got the following error.
PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT
Did some looking around and found that actually my ANDROID_HOME environment variable was pointing to the incorrect location. So I added the following commands to my ~/.bash_profile to update the ANDROID_HOME variable to point to my Android directory, which for me looked like the following.
export ANDROID_HOME=/Users/{USER_NAME}/.android/
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
See this Stack Overflow post for more information on updating the environment variable.
After that, I restarted Android Studio and was able to run my emulator as normal.
Free more space on your disk. The problem may be related to the space left on your hard disk.
try to use another emulator like Genymotion or BlueStacks
and run it manually before runnig your app
I had this issue after manually moving Android SDK to another disk to save disk space on C:\ and improperly setting ANDROID_SDK_HOME.
I set ANDROID_SDK_HOME to d:\stuff\android\.android\ whereas it should have been d:\stuff\android\.
Apart from that, since Android machinery was creating another .android inside .android so I moved its contents one folder up.
Only running emulators that were x86 worked for me.
(I also edited the emulator settings for that device and selected "automatic" for graphics driver and selected a device as it appeared to be uninitialised).
Also check out the obvious: Google's page on it
This is certainly a repeated question, I have seen and tried many answers. When I try to deploy an android application, I am getting error as -
------------------------------
Android Launch!
The connection to adb is down, and a severe error has occured.
You must restart adb and Eclipse.
Please ensure that adb is correctly located at 'D:\Android SDK 22.6.2\sdk\platform-tools\adb.exe' and can be executed.
I tried -
adb kill-server
restart eclipse
adb start-server
Checked adb is located in platform-tools and same path is updated in eclipse SDK location also
Started adb.exe from cmd to run adb devices where I can see my devices (they are offline)
Went to windows task manager and killed adb.exe process and restarted eclipse again.
Even after all these steps, I am unable to start adb from eclipse. In run configurations also, I have launch configuration with actual package name.
I can start the Emulator separately from ADB Devices dialog in eclipse, but the device is always offline. I am not sure where I am going wrong in this part. Can any one please help me out of this?
Please let me know in case of any additional details required.
Finally, after installing Android Studio, the problem was solved. Thanks #An-driod
ADB not responding. If you'd like to retry, then please manually kill "adb.exe" and click 'Restart'
I have been getting this error for a while now and its really bugging me. every time I hook up my phone and try to run my app, this error pops up.
I am new to android studio and I was doing my first ever project in it. I looked around a bit on the internet and found out to go to task manager and kill adb server but it did not help. If anyone can help me I would really appreciate it.
I often run this batch file to get my ADB connection to work:
rem kill/start server
Set ADBPath=D:\AndroidDevelopment\adt-bundle-windows-x86-20130522\sdk\platform-tools\
#REM set ADB_TRACE=1
%ADBPath%adb devices
%AdBPath%adb.exe kill-server
%AdBPath%adb start-server
MORE
I can't seem to be able to debug a JNLP application with Eclipse. The problem I'm getting is very similar to that described in this SO question, i.e., javaws appears to be starting the VM twice. The first time it starts fine with the remote debugging options and provided I use the suspend=y option I can even attach the Eclipse debugger to the VM, but as soon as it attaches the VM dies and javaws starts it again without the debugging options.
Here's how I'm launching the app:
javaws -J-Xdebug -J-Xnoagent -J-Djava.compiler=NONE -J-Xrunjdwp:transport=dt_socket,address=8989,server=y,suspend=y http://myserver/launch.jnlp
Since I have suspend=y, whilst it's waiting for a debugger to attach I can use ps -ef | grep java to see the java process with all the correct options running. Indeed, I can connect the Eclipse debugger to it, but as soon as I do that the process terminates and javaws starts a new java process. If I subsequently do another ps I can see a new (different PID) java process now without the debugging options. Attempting to connect to this process from Eclipse just gives "connection refused".
I'm using Java 6 on Mac OS X Lion 10.7.3 if that makes any difference.
The author of the SO question I mentioned above says he solved the problem apparently by accident so the cause of the problem is not apparent (or I'm too stupid to get it).
Any ideas?
Check if you have more then Java 7 update 67.
If you do I know that oracle has open bug for this.
some how from update 67 and above there is problem with this.
I had the same problem. I roll back to Java 7 update 60 and now its working fine.
I suggesting to remove all Java installation and then install