Not working emulator

I have problems running a sketch in Emulator (Android Mode) I use Processing 3.3.6 on Windows 10. Android Mode 4.0.1 installed.

  1. when I launch the emulator, I just get a black screen of Android Emulator - processing - phone:5566
  2. After a long wait with "Waiting for the emulator to become available" I get "Lost connection with emulator while launching. Try again".

It seems I have not accepted the license Agreement of the component [Android SDK Build - Tools 26.0.2]

Maybe there is a problem with the folder’s names…

Processing tells:

Checking the license for package Android SDK Build-Tools 26.0.2 in C:\Users\HP\Documents\Processing\android\sdk\licenses

but I have different folders' names (for instance, I have C:\Utenti\ ... that's the Italian for "Users"...

I just want to create very simple apps from simple Processing code. I fear my technical knowledge is … almost null; if you want to help me, you have to explain in detail what I have to do. Suggestions? Thanks a lot!


  • Can you describe how did you install your android SDK? Also, have you run a sketch before on an actual device? From Processing? Fro AS?

    My first suggestion is to make sure your Android Mode (AM) is correctly setup. Hence, I am asking these questions.


  • Thank you so much kfrajer I followed the instruction in

    __**Open the CM by clicking the “Add Mode…” option that appears in the drop-down menu in the upper-right corner of the PDE (Figure 1-4).

    Figure 1-4. Opening the Contribution Manager to add a new mode Select the entry for Android mode in the Modes tab, then click the Install button. After installation is complete, close the CM and switch to Android mode using the same drop-down menu from Figure 1-4. If a valid SDK is detected on the computer, Processing will ask if we want to use it or download a new one (Figure 1-5). Because the SDK is very large (up to several GBs), it can be a good idea to use the one that is already installed to save disk space. However, if that SDK is also used by another development tool, such as Android Studio, it may get updated outside Processing, which may lead to incompatibilities with the mode._** _ Now, even if I download a more recent release of Processing, Android Mode 4.0.1 is available when I launch Processing for the first time. I removed and re-installed Android Mode: nothing changed.

    I didn't run a sketch on an actual device.

    Here is the path I get on my PC: C:\Utenti\HP\Documents\Processing\android\sdk

    I have no "licenses" folder but

    C:\Users\HP\Documents\Processing\android\sdk\extras C:\Users\HP\Documents\Processing\android\sdk\extras\android\m2repository C:\Users\HP\Documents\Processing\android\sdk\extras\google\m2repository ....

  • edited March 4

    Ok, thank you for answering the questions. This is how I installed the AM in Processing. I want to document it here and keep in mind these notes are from memory. Just to add, I run the emulator in Processing just now and it worked.

    I have a Win 10 machine and P3.3.6 and AM4.0.1. I installed the Android SDK by installing Android Studio and selecting to install the Android SDK as well. I made a note of the sdk folder selected in the installation. Then I started Android Studio, I go to its SDK manager and I make sure I have Android API 26 (I didn't check this step, but I think I also have 21, 22 and 24). After they are installed, I closed AS. Then I ran Processing, I installed the AM as described above. After AM is installed, I switched from java to Android Mode in the PDE. The first time it tells me it cannot find the Android SDK and it gives me two options: Locate SDK Path Manually or Download SDK Automatically. I chose the first one and I provided the path of my SDK manually.

    Then before I do anything else, I go to Android >> SDK updater and I make sure there are no updates pending.

    Then in the processing IDE, I use the template I provide at the end of this post for testing. Then I go to Sketch>>Run in Emulator. As you described, an emulator window is launched where a Google animation is played for 15 seconds before the screen goes black. After about 2 minutes (ahhh slow laptop) I get the emulator showing me what it looks like a phone: Android Emulator - processing-phine:5566. My sketch is launched there. I click on the window and I register the ellipses.

    As a side note, I cannot comment if downloading the Android SDK automatically works all the time. I tried this method long ago and it didn't work for me. I stick to this manner to install my Android SDK. From what I read, it seems that installing it this option, through the PDE, provides all the files you need to run AM in Processing. The reason I do it through Android Studio is because I am able to select and remove items in the SDK through their program. These options are simply not present in the SDK Updater in Processing.


    // IMPORTS:
    import android.content.Context;
    import android.widget.FrameLayout;
    import android.os.Environment;
    import android.widget.Toast;
    import android.os.Looper;
    import android.view.WindowManager;
    import android.os.Bundle;
    import android.view.ViewParent;
    import android.view.ViewGroup;
    import android.view.View;
    import android.widget.RelativeLayout;
    import android.view.LayoutInflater;
    import android.R.string;
    Activity act;
    Context mC;
    void setup(){
      act = this.getActivity();
    void draw(){
      //Erases everything in the sketch every two seconds approx.
    void keyReleased(){
    void mouseReleased(){
    //  @@@@@@@@@@@@
    @ Override 
      public void onCreate(Bundle savedInstanceState) {
    //  @@@@@@@@@@@@
    @ Override 
      public void onStart() {
    //  @@@@@@@@@@@@
    @ Override 
      public void onResume() {
      act = this.getActivity();
      mC= act.getApplicationContext();
    //  @@@@@@@@@@@@
    @ Override 
      public void onPause() {
    //  @@@@@@@@@@@@
    @ Override 
      public void onStop() {
    //  @@@@@@@@@@@@
    @ Override 
      public void onDestroy() {

    Keywords: kf_keyword Android_SDK Android_SDK_Install Android_Emulator

  • Thank you so much, kfrajer, you are very kind. I'll try to follow your suggestions and I'll let you know what happens

  • I installed Android Studio; if I run Processing, I have Android Mode 4.0.1 installed (I removed and re-installed several times). When I try to "Run in Emulator" a sketch, well, same problems. Maybe the following images can help you to solve the problem (as I told before, alas, my thecnical knowledges are ... close to zero)







  • It is hard to read but the first few lines of your error says you have to accept a license agreement for Android SDK Tools. Please do a search in google and see if you find any leads.


  • Hi oighen. When I started with processing some months ago, l had the same problem. I have spent hours and hours, without success. Running on device works well, but why would you wait 4 minutes to compile on your PC. My advice is; use APDE, It compiles in seconds! But use the beta version. The one on the Play Store has a terrible bug. You lose your code sometimes!

Sign In or Register to comment.