# Android Emulator Not Working

Hi, beginner here, please be gentle.
I want to start playing with creating simple apps for android.
Processing version is 4.0b8 on windows 10.
Installed the SDK files , by downloading them automatically from Processing. android Mode seems to run. still didn’t try to connect a device though. I am trying to run the emulator, it downloads and installs the emulator files, but when I try to run a simple sketch it shows an error that says:

The default Android could not be set up. make sure that the android SDK is installed properly, and the system images are installed for level 30.
(Between you and me, occasionally, this error is a red herring, and your sketch may be launching shortly.)


and here is the last part of the error:

BUILD SUCCESSFUL in 31s
27 actionable tasks: 27 executed
Loading local repository...
[=========                              ] 25% Loading local repository...
[=========                              ] 25% Fetch remote repository...
[=======================================] 100% Fetch remote repository...
Auto-selecting single ABI armeabi-v7a
Error: "emulator" package must be installed!
null


It seems to say that the emulator didn’t install, but I did see the progress bar when the processing app was downloading it, and it created a “Temp” folder in the Documents/Android directory, which is where the SDK folder is. It disappeared after the download and installation finished.
thank you in advance for your help.

I had the same issue in Linux.
The fix for me was using the command from a Stack-Exchange post

The command I used (on Linux):
“cd /home/me/sketchbook/android/sdk/cmdline-tools/latest/bin”
“./sdkmanager --channel=3 emulator”

I expect the Windows equivalent would be:
“c:\path\to\your\sketchbook\android\sdk\cmdline-tools\latest\bin\sdkmanager --channel=3 emulator”
(do not include quotes)

Unfortunately, I do not have access to a Windows machine to try this on.

Restart Processing after running the command if you had not already closed it.

Edit: I also had to add Processing’s Java path before it would run. Not sure if that will be required on Windows. Your mileage may vary. Linux call with path: “JAVA_HOME=/home/me/path/to/processing/java ./sdkmanager --channel=3 emulator”

Hi
You don’t have to install and use emulator your android device replace the emulator

Half hour or more to run simple sketch with emulator on my core I3 PC with 4GB RAM

Direct run on Android take less than 2 minutes

On my Mac system, the emulator seems to be a little faster than running on the device. My only problem is that the emulator is a processing-phone and I’m not sure how to switch it to a tablet emulator.

Thanks guys, I didn’t reply earlier because I am full of work at the moment.
I am using my device connected to Processing 4 to test the sketches. I guess you are right, this is much better than the emulator. I just have to remember uninstalling all sketches from my device when i am testing different examples

The issues related to the emulator have been fixed in the release 4.5.0beta1 of the Processing for Android

Thanks, will update as soon as possible.

1 Like

@svan I’m considering your comment as a suggestion, it seems a good idea to provide a custom emulator creator option in Android Mode. I’ll see if it can be feasible to provide such option.

Thanks,
Rupesh

1 Like

Thank you. I did find a work around but without revisiting it, I can’t recall all the details. It involved replacing processing-phone with a larger skin some how. I don’t always trust the emulator behavior to be the same as the actual device.

1 Like