Android Studio: Unable to obtain result of 'adb version'

后端 未结 4 995
轻奢々
轻奢々 2020-12-06 18:18

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\'

4条回答
  •  既然无缘
    2020-12-06 18:47

    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\\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.

提交回复
热议问题