androidandroid-emulatorandroid-virtual-deviceavd-manager

Exception during AvdManager initialization : expected a non-null reference


When I run the following command :

c:\SDKs\android\cmdline-tools\8.0\bin\avdmanager.bat -v create avd -n android13 -k "system-images;android-33;google_apis;arm64-v8a"

I receive the error :

[=======================================] 100% Fetch remote repository...
Error: Exception during AvdManager initialization
Error: null
expected a non-null reference

What is going wrong ?


Solution

  • Android Studio on Windows now defaults to PowerShell:

    cd .\cmdline-tools\latest\bin
    .\sdkmanager.bat --list
    .\avdmanager.bat -v create avd -n android13 -k "system-images;android-33;google_apis;arm64-v8a"
    

    Directory cmdline-tools\latest\bin could also be added to PATH.

    Or to install: cmdline-tools;latest