I am trying to start development on an Android app using Android Studio, but whenever I try to run the app I get the error Unable to obtain result of 'adb version' I have tried uninstalling and reinstalling Android Studio multiple times on different computers (both running Windows 10) and every time I get the same error. I have researched the problem and have been unable to find a consistent solution. (or one that actually works) I am very new to Android development and am slightly at a loss as to what to do; any help on solving this problem would be much appreciated.
Found the solution thanks to #user3109468, Android Studio had the directory for the Android SDK wrong. In File>Project Structure make sure the directory for the SDK is correct; mine was C:\Users\[user]\AppData\Local\Android\sdk (Google had given sdk a capital "S" for some reason...)
Uncheck: enable adb integration from Tools>Android and re-enable it.
This worked for me.
This might be because of windows virtual memory problem.
Try running adb from command line. something like
adb version BTW, platform-tools would be located in
c:\Users\<your userid>\AppData\Local\Android\sdk\platform-tools
How much it takes from you firing a command and actually gets an answer ?
if it takes more than 5 seconds, then android studio times out waiting for an answer and throws up an error.
How to fix ?
close all your program ( Process ? )
and go to control panel -> System->advance System settings-> Advanced tab->performance->settings->Advance->Virtual memory change
Try to reduce virtual memory size. Fr e.g. If it's 4096Mb make it 2048Mb ( both initial and maximum) It will ask to restart, so restart and get yourself a cup of coffee, because it will take a while. Then, once your system is up , try running adb version. Does it run quickly ? If yes, problem is fixed. Go back to virtual memory and increase it's size to the one before, and that's it.
BTW, I noticed in my case that simple hello world program was taking 20 sec to execute on my machine before fixing virtual memory problem.
Make sure Android SDK location and Android NDK location is correct.
Go to File -> Project Structure.
Set the Android SDK location and Android NDK location.
Related
I have some trouble about android studio. if anybody know this program, please read description of my problem.
I created empty activity project android 5.0(lolipop) and just click run by emulator. I already tried different kind of devices, but the error is the same. My friends have no problem like that.
please tell me what to do.screenshot of emulator error message and photo of log error
updated event log after trying reinstall emulator devices
Do you have Bandicam installed like it's suggesting? It's complaining about your Vulkan drivers ( you could update those) and Bandicam messing with them (you could uninstall that).
Alternatively you can open your AVD Manager, edit the AVD you're using, and set Emulated Performance: Graphics to Software (can't do it on every image for some reason - my API 29 Pixel 3 image won't let me change it, my API 30 Pixel 3XL image will). It'll run worse, but it'll run (well it should anyway)
If you use the flatpak of android studio on linux, run "flatpak update" and that should resolve your issues.
If you don't use the flatpak on linux, try restarting your machine and if that doesn't work, do a clean reinstall of your graphics driver.
Don't know why people keep trying to recommend software rendering, it's horrible and not at all practical, it's a barely working workaround not a solution.
I'm newbie in Android devlopement I installed Android studio configured every thing Android SDK, JDK , System variables .. every thing works just fine until i created my Android Virtual device , first, it takes so long to start , second, after it shows the hello world an error message pops up saying "Process system isn't responsing x Close app , o Wait"
I tried creating many other devices , with low RAM low resolution , I even changed the config file but none of them works for me I always get the same error .. help please I'm stuck in this for two days.. THANKS here is the error
Try to enable virtualization from bios of your system.also increase your system RAM.
Do the following to get rid of the app not responding close/wait error:
Android Studio --> Help --> Edit VmOptions
As posted above this was a solution to my "Processing system isn't responding".
I used the Nexus S API 23, 4.0 480x800 hdpi
Graphics in Software mode
RAM 2GB VM heap: 48m
Internal storage 600m
The Processing error does not appear. I do get the Google Play not working, but the background screen updated. After leaving it for almost 30 minutes, it came up. i was able to run my app.
Do the following to get rid of the app not responding close/wait error:
Android Studio --> Help --> Edit VmOptions
-Xms1024m
-Xmx4096m # <------ increase this to most of your RAM
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=440m
-XX:+UseCompressedOops
-XX:+HeapDumpOnOutOfMemoryError
-Dfile.encoding=UTF-8
I struggled for 3-4 days, and finally managed to resolve this error. Android emulator also works fast, first time boot is always sloow, but subsequent changes in app are faster!!
I'm Shreepal, I tried mine to help. Here are a few steps you can try to resolve this issue:
List item Make sure you have the latest version of Android Studio installed.
List item Ensure that the graphics acceleration is enabled in the BIOS and the emulator configuration.
Disable the "Use Host GPU" option in the emulator settings.
Use an x86-based system image instead of an arm-based one.
Try to run the emulator from the command line using the "emulator" command and see if there are any error messages that can give you a clue about what's going wrong.
If none of these solutions works, you can try to search for specific error messages in the Android Studio log files, or ask for help on online forum.
I have created a VM Ubuntu 14.04 using Vmware Player, and I've installed the ADT environment for Android Development.
I have created a new Android emulator using the shortcuts present in Eclipse; when I tried to start emulator I got the following known error:
Starting emulator for AVD 'AVD_for_Nexus_5_by_Google'
ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them
you will have to do at least one of the following:
- Use the '-force-32bit' option when invoking 'emulator'.
- Set ANDROID_EMULATOR_FORCE_32BIT to 'true' in your environment.
Either one will allow you to use the 32-bit binaries, but please be
aware that these will disappear in a future Android SDK release.
Consider moving to a 64-bit Linux system before that happens.
I fixed it in both ways: putting a variable in my .bashrc:
export ANDROID_EMULATOR_FORCE_32BIT=true
and also setting the emulator option in the Eclipse preference dialog:
Nevertheless, every time I try to start the emulator I got always the same error.
The wierd thing is that if I try to start the emulator from a bash window, it starts normally.
This could have been a boring workaround, but I would have been happy anyway. The problem is that when I try to deploy an application from Eclipse, the emulator started in this way is shown as "Offline" and I cannot run any application on it. Possibly I can upload the apk into the emulator from the command line, but debugging the app would become a bit harder.
Has anyone got the same problem or does know how to fix it?
I found out a partial solution for connecting eclipse to the running emulator started by command line: the emulator MUST be started with no snapshots.
Indeed, if I start the emulator without snaspshots, it become "online" in DDMS, and I can finally use it.
Although this could be a bit annoying, because starting the emulator from scratch every time it takes a long time, at least I have a way to use it.
On the other hand, I don't know exactly the reason of this behavior, if someone has an answer it will be appreciated.
Moreover, I still do not have idea why I'm not able to start the emulator from Eclipse.
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.
I'm using Windows 7 Ultimate 64 bit edition and Eclipse 3.5 with the Android plugin. Every time I create a new project and try to publish it, I get an error like this:
[2010-02-15 22:48:10 - EPG3]Uploading EPG3.apk onto device 'emulator-5554'
[2010-02-15 22:48:15 - EPG3]Failed to upload EPG3.apk on device 'emulator-5554'
[2010-02-15 22:48:15 - EPG3]java.io.IOException: Unable to upload file: timeout
[2010-02-15 22:48:15 - EPG3]Launch canceled!
The emulator is working perfectly, adb can see it, I can even logcat from it, but it can't push or pull anything from it. Nothing appears in logcat to suggest the emulator even received any command. It doesn't matter if I have the Firewall on or off, or if I try invoking adb install to bypass the plugin. Nothing works even with a blank app.
Any ideas?
Not sure if this helps but I had the same exception when I tried uploading a project to the device and fixed it by increasing the value of "adb connection time out (ms)"
PC: (eclipse -> window -> settings -> android -> ddms)
MAC: (eclipse -> preferences -> android -> ddms)
I was pretty pissed at myself that it took me so long to find the setting so I thought I'd share.
I just ran into this error. To resolve it, I deleted my .apk file and built the project again. Voila! Upload works now.
Isnt this a problem with resources loading? Tried all the hello examples without problems, now the first with drawables and now I/O problem as you had.
I think its the reason that in the example they speak of a drawable folder, but in my default project structur there are 3 drawable folders.
Keep on debugging ;)
I got this error about every 30-40 compilations. I don't how, but this solution work for me.
Go to bin/ folder and rename your EPG3-debug.apk file to EPG3.apk (if you are using debug mode) or EPG3-release.apk to EPG3.apk (in Run mode), return to Eclipse, now you can Debug/Run your application. This should "unchoke" this whole situation, so you can make changes in your code and next time Debug/Run program normally (until you get this error once again, then you must repeat this tip).
See this question — Windows 7 and Android don't seem to get on so well initially it seems: Failed to parse the output of 'adb version'?
Are you able to telnet to localhost 5037? That's where the adb server listens for incoming connections from adb clients.
Did you try to add the path of the tools directory to your system PATH as described here ?