APKs are not installed

edited May 2017 in Android Mode

Hi! I'm using processing at school for teaching beginners on programming. All has been fine for 3 years now, but last week, when the students installed AndroidMode for the first time, the resulting APKs (very very simple programs) could not be installed. We compiled with API 4.0 which is good for all devices. I installed Processing 3.3.3 on my own computer with AndroidMode 3.0.2 - same result, APK not installed (installation on Samsung Smartphone looks good first, but instead of "successfully installed" I get "App was not installed" (in German). Not only my phone, also all (!) students phones. Spent 2 nights on that topic, would like to continue work at school with processing. Any hints what to do would really really be appreciated!


  • edited December 2017

    I am tagging @codeanticode Keyword: antant toolchain SDK-Android AndroidTicket android-sdk android-mode

    This forum as a reference: https://forum.processing.org/two/discussion/comment/97531/#Comment_97531

    Please provide all these next details. I know you have provided most of the information in your post but this is for completness.


    • Processing version

    • Android mode Version

    • Operating system

    • Target APIs you have tried (Installed through the Android SDK manager and visible in the Processing IDE Android mode)

    • Android SDK version. Did you install it yourself or using the automatic installation offered by the Processing IDE android mode?

    • Have you run Android apps in Processing before? In any other SDK like Eclipse or Android Studio (AS)?

    • Is this your first time? Did you enabled the developer mode in your device?

    • Did you check the following website as a reference: http://android.processing.org/install.html Did you try any other set of instructions? Which ones? Can you provide your link?

    • Are you running your app in an actual device or through an emulator? (NOTE: It is strongly recommended to do it on an actual device)

    • In case you found something meaningful in the forum or in other site, please provide links (If nothing found... leave blank).

    • Have you tried anything else? For example, renaming/removing the manifest and letting Processing recreate the manifest for you again? (To access the manifest, press ctrl+k in your sketch and there should be a file called "manifest.xml")

    EDITED:****** Extra questions as suggested by akenaton

    • Have you activated the debug mode on your phone + what is your phone OS ? ) + give us more error code (not only the first 2 lines)
  • I had a similar problem that never got fixed, but because I needed the code put on to my tablet right away for my thesis, I started to work around it. So maybe this could work for your class too, just to move forward.

    I work with my code in java mode and test in java mode too. I just have to be careful not to use any code that won't work on the android. Once I feel good about the code I save it and duplicate it to a version I save in android mode. Just save, don't run.

    I downloaded the processing IDE app on to my android device. https://play.google.com/store/apps/details?id=com.calsignlabs.apde&hl=en If you have the sketchbook saved external, then you can drop the folder to the sketchbook via usb. Note: you have to save a sketch first to create the sketchbook.

    Most times when I run the code, the apk installs fine. Usually the errors are from me. Unless it's resize, because resize is a bully.

  • @Chris0211===

    • try to compile with 6.0
    • minSDK with P5 android mode is now set (manifest) to 16
    • API 4.0 is 14
  • Hi! To kfrajer and all others processing version 3.3.3

    Android Version 3.0.2

    operating system Windows 7 professional, also Windows 8 and 10

    SDK version: not sure, downloades automaticaly on May 10, 2017

    run Android apps before? Yes, frequently. Proc 3.0.2 with Android mode 3.0-RC3, but still this combination doesn't work anymore. Note: I even copied the whole folder AndroidMode from a running version of processing to another system into a newly installed processing 3.0.2- still no results.

    developer mode / USB debugging enabled: yes

    in other forums found hints that there might be references to wrong API-Versions in AndroidManifest.xml but couldn't open file to check. Tried emulator installing the APKs but got error "INSTALL_FAILED_OLDER_SDK". Connection lost. Not sure if emulator worked correctly at all.

    I imagine it's a problem with sdk. I am not sure how to install one manually, not even how to determine version number or where to download a different one. I already copied the whole AndroidMode-folder from a runnig system (with Android SDK) to my school PC - still same result APK won't install.

    Thanks for all help!


  • I also already tried API 3, 4, 5, 6, 7 all with the same not satisfactory result.

  • @akenaton Thanks for quick answer. I tried to compile with API 6.0 - still same result: APK does not install. The last two lines I didn't really understand. What is your advice there? Please be so Kind and clarify for me! Thanks! Chris

  • @kamikarras If nothing else works this is a way out. But as you stated yourself, developing besomes more difficult and the frequent testing, which is necessary for students, can't easily be accomplished. I'm sure there must be a simple solution to this problem! Thanks anyway!

  • Open a new sketch, switch to android mode and write a simple code like this one: http://android.processing.org/tutorials/getting_started/index.html

    void setup() {
    void draw() {
      if (mousePressed) {
        if (mouseX < width/2) {
          rect(0, 0, width/2, height); // Left
        } else {
          rect(width/2, 0, width/2, height); // Right

    If you do this, what errors do you get?

    Related to the API target, if you are using the latest Android mode (vers 4. ), you need to be aware the min target is 16 which is API 6. However, if you switch to Android version 3.0.2, then the min is 15. Notice, if you change the android version from from 4 to 3.0.2, you need to open the sketch folder (hit ctrl+k) and delete (or better, rename) the manifest file. Then, if you are using any permissions through the permission manager, you have to enable them again so they get included in the brand new auto-generated manifest (thanks to the Processing IDE - Android mode).

    Also, can you go to your Android SDK folder and list the content of the following folder: ...../AndroidSDK/sdk/tools

    In my machine, I have the SDK in my secondary drive: D:\Program_Files\AndroidSDK\sdk so go inside this folder in your machine and then go inside the tools folder.

    The key point is to check if you have the ants scripts in your SDK which they were removed in a recent SDK update. Looking at the above folder will tell us if you have the proper version to run Android mode code.


  • Hi kfrajer,

    thank you for your concise answer. I have again spent many hours exploring my processing according to your hints. First of all: when I entered your example program, processing compiled it all right and the resulting apk worked fine!

    As usual I got 11 warnings like "The Import.java.io.OutputStream is never used" and - as usual - ignored them.

    So I thought maybe something is wrong with my program? I compiled it in a different instance of processing - didn't work.

    int x, y;

    void setup() {   size(300,300); x=100; y=100; }   void draw() {   background(200); fill(200,0,0);   rect(x,y,30,30); }

    void mousePressed() { x=mouseX; y=mouseY; }

    So I slowly changed it and made it step by step more and more similar to your program. No success, till it was finally your program but didn't result in a working apk. The first instance of processing still compiled a working version. Very strange. Then it had arleady become late night. Yesterday I tried to reproduce the same error, but miraculously now even my program was compiled properly and apk works. Today again: apk of my program does not install.

    Anyway: inside of the Tools Folder there are the folders

    ant apps bin lib lib64 proguard qemu support templates

    and then a couple of files: Android.bat ddms.bat draw9patch.bat Emulator.exe emulator64-crase-service.exe

    and about 20 more.

    Inside of the ant-folder there are

    build.xml NOTICE uibuild.xml

    and that's it.

    Is there anything that Looks suspicious to you?

    Thanks again for your efforts!


  • Don't worry about warnings... they are because of the Processing core (the Android version). If the program works on your device, and if it runs fine, then that is as good as it gets.


Sign In or Register to comment.