I m facing a problem whenever i m running my application . it says Failed to start monitor thread and : adb server didnt ack.
I tried every possible way but it served no purpose.
Here are the following steps i did to solve it:
I opened task manager and killed adb and then restarted ADT.
in the command prompt i killed the running adb server then restarted it.
in the DDMS i tried to reset the adb but it says Plugins are not configured properly.
I have properly set my path even though these problems are popping up.
I think there is not any device issue as even my emulator failed to start.
sometime on restarting the adb server error comes as `daemon still not running"
kindly help me out...
What version of ADT are you using?
If you've recently updated the Android SDK, but haven't removed and reinstalled (from scratch) Eclipse, then that' likely the source of the problem. When Google released the newest version of the SDK, they seemed to have messed up ADT updating.
Removed ADT from your computer (you can leave the SDK Manager installed) and reinstall Eclipse from http://eclipse.org/
Once you've reinstalled Eclipse, follow these instructions to get your ADT plugin working: http://developer.android.com/sdk/installing/installing-adt.html
Related
I am at my wits end! I could really use some help with Android Studio, specifically the emulator AVD.
It is outputting console logs extremely slowly. This only just started happening, but I've backtracked through my code and rolled back to previous versions, and it is still happening.
Does anybody know what might be going on here?
What is the best way to troubleshoot slow adb logcat?
I have tried:
Reset PC
Clean gradle
Invalidate/resync project
Reset Andriod Studio
Kill adb server, restart
Different versions of Platform Tools/SDK BuildTools through SDK manager
Deleting and recreating emulated device in AVD manager, increasing RAM/Storage etc. for emulator
Rolling back my GIT project to a previous, working version
Things I haven't tried:
Changing the build.gradle build version - I'm not familiar/confident with this, but could try it. (i.e. SDKBuildVersion, LibVersion)
Reinstalling windows
Giving up (completely)
Is there anyone with more Android Studio knowledge who might have some advice on what to try here?
Thank you in advance!
I am trying to install apk from android studio. Initially I got below error:
So I disable instant run as suggested in many post on stackoverflow like this How To Stop Installation of Multiple Slice APK In Android Studio 2.3.
Now I am getting below error after disabling instant run:
java.io.IOException: An established connection was aborted by the
software in your host machine Error while Installing APK
I have only one instance of android studio running when I got this error.
Android studio version is 3.3.1. What can be cause of above error.
Also I am not able to install apk using adb install command. I am getting message failed to install apk with no detail message.
You can restart Android Studio : File -> Invalidate caches/restart
And i think you install ADB-Idea pluggin to uninstall or clear app data very easy with shortcut.
ADB-Idea pluggin :
Link
So I found out why I was not able to install apk from studio or from adb install command. Issue was due to my pc usb port was blocked by network administrator of our organization as my usb port usage period expired. So if anyone facing issue of not able to install apk and getting error as mentioned in question and no solution working for you than please check if your pc ports are not blocked by your organization network admin. I took approval to use usb port and it is working now.
You have got the first error because of :
You are testing your project_A on a emulator_E
As you had the app project_A, installed on the emulator_E, in previous run.
Now you started the execution of your project_A, again on the emulator_E.
The Android_Studio and emulator_E, both came to know that, the apk is already on the emulator_E, so just, whatever the new changes are, will be synchronised, within the, already available project_A apk, on the emulator_E.
But as the whole process takes some time, you uninstalled the apk of project_A on a emulator_E.
And now project_A on a emulator_E is not there, but Android_Studio tried to synchronised it, which leads you to the ERROR_1
Solution
You are following many approaches, for the same thing.
You are starting your project, project_A on the emulator_E by :-
via ADB INSTALL from the command line too
With Instant Run too
With Instant Run too
And you are not keeping the previous apk as it is there on the emulator_E, after starting the execution too.
Uninstall it from emulator_E, but before you start the execution for emulator_E. Which lead to your Android Studio to some dangerous STATE_A and, Android Studio is not tested by google for such types users
It may seem harsh, and obviously it is not the answer, but this is the exact problem, which is leading you to the such case.
Android studio pops up error message as soon as running the IDE.
As suggested by others, I have done followings and still see the error message.
Kill all adb processes
Developer option turn off and on again
Revoke USB debug authorizations
Manually starting the adb server does not work, it seems having conflict with Android Studio as the IDE tries to initiate its own adb.
One thing I notice in the Task Manager is that as I start the Android Studio, two adb processes get initiated then I see the error message above..
New update(March 24th, 2017): just found a thread talking about this after spending 3 days on this issue...really Google!#?
Issue 258400
Whoever stumbling upon same issue, to make a long story short, the latest version(25.0.4) has bug with Windows 7 Issue posted in Google Android.. (as of March 24th, 2017).
Just revert to 25.0.3 and adb.exe runs fine.
I have read many of the posts for logcat not displaying in Eclipse and so far nothing has solved my problem. I have two installs. Logcat in Eclipse installed on my windows laptop works, but on my Linux Mint laptop those same programs will not display in logcat and not just with my log command in the program, but nothing shows - not even a trace.
The command line options of using adb logcat shows the logs just fine. It just won't show in the logcat window in Eclipse.
I have made sure the emulator is selected on the device tab, I have reset adb, I have restarted eclipse,Under I made sure "Monitor logcat for messages from applications in workspace" was checked and selected "VERBOSE".
I don't have any filters set.
Any ideas on what to try next?
I have had other problems with this linux installation that I had to fix. For instance, the default Google Eclipse/Plugin Bundle had some bugs. Some of which were solved with a new version of Eclipse and some were solved with a new version of ADT.The version of ADT also had a bug that would not let you upgrade it through Eclipse. So, I removed that bundle install and re-installed everything manually:Eclipse 4.4, then installed the 4.4 plugin and the various build tools and API levels and extras I needed. That solved some of those bugs.
That left the logcat issue and one major bug. Eclipse would freeze-up when the android auto-complete pop-up would display. On a hunch, I decided to run Android-Studio to see if it had any freeze-ups. When I started Studio, it warned me that I was using OpenJDK and it has known GUI performance problems and hangs. It gave a message that it recommended that I install the offical Oracle JDK, which I then did. That solved freeze-ups and hangs on Eclipse with the Android auto complete popups.
Now just this one problem left to solve - on my Linux environment, making logcat within Eclipse wok. Any suggestions are appreciated.
I am having a problem in running my app in Emulator. There are no errors or warnings in the code, its running perfect in device, but when it comes to emulator, it always crashes and the error message would be like this
[2012-01-16 16:13:55 - MyApp] Failed to install MyApp.apk on device 'emulator-5554!
[2012-01-16 16:13:55 - MyApp] (null)
[2012-01-16 16:13:55 - MyApp] Launch canceled!
I have tried the following things:
Run configurations > Target > Wipe user data > Run
Uninstalling the app and run it again
Restarting the emulator
adb kill-server && adb start-server
Creating a new Emulator and running the app in it
Restarting ADB
Restarting Eclipse
Starting the Eclipse after the emulator is launched completely
Increasing the ADB connection time-out to 1000
Restarting the System
Deleted the emulators and created new emulators and run in it after they are completely loaded
I don't know what else should I do. Sometimes if I run in a new Emulator the app runs for the first time and if I run it again after sometime, its the same crash report. I am not able to understand what is the problem.
Can anyone please suggest me what should I do now and where is the problem?
The Emulator used to work well before. This problem started a few days back.
Any help will be appreciated. Thanks All.
Have you defined all of your Activities correctly and completely in AndroidManifest.xml?
Can you paste the definition of your AndroidManifest.xml here?
Try that.
More possibilities:
Real refresh of AVD. It is funny, but Eclipse remembers your emulator. And if you turn it off and on it will be the same old good (or bad) one. You could reinstall all Eclipse for a real refresh. Or use a shorter, but tricky way. Change the max VM app heap size of the emulator. (Android SDK and AVD manager - Virtual device - Edit) Create it. Now you have a brand new emulator. Funny, isn't it? Now you can change the heap size back, if you wish.
Really, I think, you can maybe change any emulator parameter for the effect. Only I stumbled upon it by heap size and stuck to do it this way.
Try to repair the path.
Set the path environment variable with the path of "platform-tools" and "tools" found in the "sdk-home".
On windows(vista):- 1.Go to "Control Panel\System". 2.Select "Advanced System Settings". 3.Select the "Environment variable". 4.Set the path environment variable under the system variable with values "SDKHOME\platform-tools;SDKHOME\tools". Where "SDKHOME" is the home folder of Android sdk.
Check,if APK version of the application sits with that of the
emulator.
Try to set a longer waiting time for launch.
Increase AVD heap and SD card
Maybe, it would be good to try to recall all the changes that were done before the problem appeared?
Oh! One more: Don't you have by accident simultaneously launched emulator and connected device? If you have the same application (ssame name) on both, they could conflict in a similar way! They simply won't let each other to be launched
If nothing helps:
I was already so tired of Eclipse errors, that I have installed the IntelliJ Idea IDE, too. Now, if for the same project applications behave idself differently on both IDES, the problem is in IDE setting or emulator. If the problem is the same on both, I look for a bug in my application or the external device. Once I had a problem in OS - had to restart Linux. But in your case it is the most probable, that the problem is in AVD. I am afraid, the only variant you haven't try yet is to reinstall Eclipse. Uninstall, remove everything from the application except code, layouts and Manifest, and install Eclipse anew. Or make other Eclipse installation, with its own workshop. You can try the last version. But if the problem is in some setting, you can set it again...
Sorry, I have put here all methods I used or found.
here you can find a similar problem and the proposed accepted solution:
Honeycomb preview - can not install my app on emulator under Eclipse
I hope this helps.
This could be due to Antivirus/Firewall software installed on your PC. Have you tried to disable it?
You should also ensure that versions of Eclipse, ADT and Android SDK are up-to-date and compatible. Have you tried to contact update sites in Eclipse and in Android SDK manager? By the way, what versions of the that software do you use?
Let's go step by step.....
1º- You should try to start the emulator without the application installed.
2º- Once it is running correctly, try to install another .apk(like for example one default one....)
3º- Now, try to run the .apk. If the problem continues, try to delete the current VM and install another new one.
Can you see Emulator in "adb devices"? If yes, can you install any .apk?
If not - you have propablly something wrong with sdk
As some people have answered already partly. Make sure of a couple things which are very important specially because of the latest Android tools releases which requires.
The latest eclipse version. Yes, very very important:
http://www.eclipse.org/downloads/packages/eclipse-classic-371/indigosr1
Make sure you update the Android ADT plugin for eclipse:
http://developer.android.com/sdk/eclipse-adt.html#installing
I've encountered similar issue and that was what has helped. Restart your computer too possible?...
Use command prompt to start emulator
emulator.exe -avd google2.2 -scale 0.7 -dns-server 8.8.8.8
it may help you.
try cleaning your project or deleting the .APK file in the bin directory of your project.