Android Question Error creating new AVD

AnandGupta

Expert
Licensed User
Longtime User
After many months I sat to create an app in B4X in my new laptop. Tried to create an avd. Got below error
Screenshot 2026-07-25 233740.png

Never saw such error in past. Any advise on fixing it ?
 

teddybear

Well-Known Member
Licensed User
Is there any command line to create the avd from the existing android tools in B4X, instead of installing full Android Studio ?
Yes, you can use the sdkmanager and avdmanager do that without Android Studio .
 
Last edited:
Upvote 0

teddybear

Well-Known Member
Licensed User
Original error is from avd manager.
These are commands I used in the command line.
B4X:
sdkmanager --sdk_root=D:\android --install "emulator"
sdkmanager --sdk_root=D:\android "system-images;android-36;google_apis;x86_64"
avdmanager create avd --force --name MyEmu36 --package "system-images;android-36;google_apis;x86_64"
emulator -avd MyEmu36
It works for me.

_2026-07-27_184637_347.png
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
B4X:
sdkmanager --sdk_root=D:\android --install "emulator"
sdkmanager --sdk_root=D:\android "system-images;android-36;google_apis;x86_64"
avdmanager create avd --force --name MyEmu36 --package "system-images;android-36;google_apis;x86_64"
emulator -avd MyEmu36
It works for me.

View attachment 172626
Thanks for help

Got this error
B4X:
Microsoft Windows [Version 10.0.26200.8875]
(c) Microsoft Corporation. All rights reserved.

e:\Android\emulator>emulator -avd MyEmu36
INFO         | Android emulator version 36.6.11.0 (build_id 15507667) (CL:N/A)
INFO         | Graphics backend: gfxstream
INFO         | AVD MyEmu36 has path C:\Users\Anand\.android\avd\..\avd\MyEmu36.avd
INFO         | trying to check whether e:\Android is a valid sdk root
WARNING      | e:\Android\Android-old\system-images\android-36\google_apis\x86_64\ is not a valid directory.
WARNING      | emulator has searched the above paths but found no valid sdk root directory.
FATAL        | Cannot find AVD system path. Please define ANDROID_SDK_ROOT

There is no "e:\Android\Android-old\" in my machine only "e:\Android\"
Something maybe wrong in my setup. I think I may have to re-install B4A and check again.
 
Upvote 0
Top