PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT (in windows 10)

后端 未结 14 2612
深忆病人
深忆病人 2020-12-15 02:15

While running an app on the virtual device (AVD) created on Android studio (in Windows 10), I am getting an error and panic.

<

14条回答
  •  情深已故
    2020-12-15 03:05

    Try to use the argument: -sysdir and then check whether the error message displayed.

    See also: https://android.googlesource.com/platform/external/qemu/+/1a15692cded92d66dea1a51389a3c4b9e3b3631a/android/emulator/main-emulator.cpp

    Check out these clip you will find out the reason:

    // Sanity checks.
    if (avdName) {
        if (!isCpuArchSupportedByRanchu(avdArch)) {
            APANIC("CPU Architecture '%s' is not supported by the QEMU2 emulator, (the classic engine is deprecated!)",
                   avdArch);
        }
        std::string systemPath = getAvdSystemPath(avdName, sysDir);
        if (systemPath.empty()) {
            const char* env = getenv("ANDROID_SDK_ROOT");
            if (!env || !env[0]) {
                APANIC("Cannot find AVD system path. Please define "
                       "ANDROID_SDK_ROOT\n");
            } else {
                APANIC("Broken AVD system path. Check your ANDROID_SDK_ROOT "
                       "value [%s]!\n",
                       env);
            }
        }
    }
    

    Then if you see emulator: ERROR: can't find SDK installation directory, please check this solution. Android emulator errors with "emulator: ERROR: can't find SDK installation directory"

提交回复
热议问题