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 ?
 
Solution
Enter the folder C:\Users\Anand\.android\avd\MyEmu36.avd.
Edit the config.ini file, and find and replace the entry image.sysdir.1 as below

B4X:
'Change this-- remove Android-old\
image.sysdir.1 = Android-old\system-images\android-36\google_apis\x86_64\
'To
image.sysdir.1 = system-images\android-36\google_apis\x86_64\

and then try
B4X:
emulator -avd MyEmu36

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

teddybear

Well-Known Member
Licensed User
I don't think you have to re-install B4A.
show your sdk folder.
it looks like this
1.png

also show the system-images folder
2.png
 
Upvote 0

teddybear

Well-Known Member
Licensed User
Enter the folder C:\Users\Anand\.android\avd\MyEmu36.avd.
Edit the config.ini file, and find and replace the entry image.sysdir.1 as below

B4X:
'Change this-- remove Android-old\
image.sysdir.1 = Android-old\system-images\android-36\google_apis\x86_64\
'To
image.sysdir.1 = system-images\android-36\google_apis\x86_64\

and then try
B4X:
emulator -avd MyEmu36
 
Upvote 0
Solution

AnandGupta

Expert
Licensed User
Longtime User
Enter the folder C:\Users\Anand\.android\avd\MyEmu36.avd.
Edit the config.ini file, and find and replace the entry image.sysdir.1 as below

B4X:
'Change this-- remove Android-old\
image.sysdir.1 = Android-old\system-images\android-36\google_apis\x86_64\
'To
image.sysdir.1 = system-images\android-36\google_apis\x86_64\

and then try
B4X:
emulator -avd MyEmu36
Thanks a lot for your guidance and help.
Emulator running now (without installing Android Studio :) )

Screenshot 2026-07-28 164419.png

BTW got this error after emulator start

B4X:
Detected ADB
---------------------------
Could not automatically detect an ADB binary. Some emulator functionality will not work until a custom path to ADB  is added. This can be done in Extended Controls (...) > Settings > General tab > 'Use detected ADB location'

And these are few warnings in the cmd box

B4X:
WARNING      | Failed to process .ini file C:\Users\Anand\.android\avd\..\avd\MyEmu36.avd\quickbootChoice.ini for reading.
WARNING      | The emulator now requires a signed jwt token for gRPC access! Use the -grpc flag if you really want an open unprotected grpc port
WARNING      | Device 'cache' does not have the requested snapshot 'default_boot'
WARNING      | Failed to load snapshot 'default_boot'

I am ignoring them now.
 
Upvote 0
Top