Lost connection error

I’m trying to run the “Getting started” example (Processing for Android), but after getting the “BUILD SUCCESSFUL” message in the console and waiting for a couple of minutes in which nothing seems to happen, I get “Lost connection with emulator while launching” (if I choose “Run in Emulator”) or “Lost connection with device while launching” (if I choose “Run on Device”). Someone suggested in another thread running this command:

emulator -avd processing-phone

However, the output (see screen shot) means nothing to me, as this is the first time using Processing for Android. Can someone translate this into something I might understand? Maybe something isn’t installed corrrectly, but I have no idea where to look.


1 Like

Not sure that I can solve this for you (I use MacOS). What you should have seen was your android emulator window launched, but that didn’t happen due to an error.

Just some observations:

  1. Look at the left hand side of your terminal output and go down to the first line with ERROR at the beginning. Your emulator didn’t launch because ‘Fragment shader(s)’ failed to compile. I have no idea what or where these are.

  2. Do you have Android Studio installed on your system? Apparently Processing works alongside Android Studio to use its emulator and this has to be set up correctly for it to work.

  3. For whatever it’s worth, when I run the terminal command line code that you posted on my system I do see an emulator, but it tells me that mine is out of date and needs to be updated. I was given the following instructions which you also might be able to use to set up your system:


How could the build complete successfully if Android Studio wasn’t installed?

Anyway, I think the message about fragment shader(s) is probably due to the fact that the computer is rather old. It has an integrated GPU, but maybe it doesn’t support all the features required by fragment shaders (whatever they are). I tried installing Processing 4 and the Android SDK on a newer computer and the sketch works fine, both on the device and in the emulator. I guess my other computer is just too old. Are the requirements for running Processing for Android and Android Studio stated anywhere?


Not sure about system requirements. Google says fragment shaders are a part of openGL: