问题
After many hours of fixing Gradle issues, I was able to build my test app in Android Studio. But when I tried to run it in an AVD, it just won't open.
This is the log:
Waiting for device.
C:\Users\Rahaman\AppData\Local\Android\android-studio\sdk\tools\emulator.exe -avd testAVD -netspeed full -netdelay none
PANIC: Could not open: testAVD
P.S.: I've defined the environment variable ANDROID_SDK_HOME to point to the .android directory.
回答1:
Okay, my libraries are in D:
drive.
So I had to copy the .android
folder from d:\myName\
to c:\Users\myName\
. That fixed it.
回答2:
You can use mklink (builtin of cmd.exe but NOT present in Powershell) to make a link like you would in linux. You must be an administrator to run the command, but once you do it will look like the directory is right there.
Run cmd.exe as an administrator. Then in my case I issued the following:
C:\Users\Dad>mklink /d .android E:\Joel\.android
Creating a regular windows shortcut (right click etc.) does not work.
回答3:
I got a slightly different solution working. I created a symlink/shortcut from C:\Users\myName\.android
to D:\Users\myName\.android
(right-click, create shortcut)
来源:https://stackoverflow.com/questions/16997703/android-studio-panic-could-not-open-avd