Howdy, Stranger!

We are about to switch to a new forum software. Until then we have removed the registration on this forum.

  • Why is giving this error ? "Error from inside the Android tools, check the console."

    @SultanGabriel=== if you are using windows it seems that this is a bug: as the error code says java/bin/keytool is not found in Processing JAVA_HOME; the same error code gives some kind of solution: try to generate the debug key with the command line, pointing where is your JAVA_HOME.

    more details here:: https://github.com/processing/processing-android/issues/254

  • Why is giving this error ? "Error from inside the Android tools, check the console."

    Console:

    BUILD FAILED /home/sultan/sketchbook/modes/AndroidMode/sdk/tools/ant/build.xml:958: The following error occurred while executing this line: /home/sultan/sketchbook/modes/AndroidMode/sdk/tools/ant/build.xml:969: The following error occurred while executing this line: /home/sultan/sketchbook/modes/AndroidMode/sdk/tools/ant/build.xml:312: com.android.sdklib.build.ApkCreationException: Failed to create key: Cannot run program "/home/sultan/processing/java/bin/keytool": error=2, No such file or directory JAVA_HOME is set to: /home/sultan/processing/java Update it if necessary, or manually execute the following command: /home/sultan/processing/java/bin/keytool -genkey -alias AndroidDebugKey -keyalg RSA -dname "CN=Android Debug,O=Android,C=US" -validity 10950 -keypass android -keystore /home/sultan/.android/debug.keystore -storepass android at com.android.sdklib.build.ApkBuilder.getDebugKey(ApkBuilder.java:300) at com.android.sdklib.build.ApkBuilder.(ApkBuilder.java:392) at com.android.ant.ApkBuilderTask.execute(ApkBuilderTask.java:334) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) at com.android.ant.IfElseTask.execute(IfElseTask.java:124) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) at com.android.ant.IfElseTask.execute(IfElseTask.java:124) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.Project.executeTarget(Project.java:1368) at processing.mode.android.AndroidBuild.antBuild(AndroidBuild.java:525) at processing.mode.android.AndroidBuild.build(AndroidBuild.java:96) at processing.mode.android.AndroidMode.handleRunDevice(AndroidMode.java:295) at processing.mode.android.AndroidEditor$16.run(AndroidEditor.java:553)

    Total time: 26 seconds

    The code :

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

    And I'm using SDK 6.0, my android device is connected via usb cable, and I have USB Debugging turned on, and I'm running Android 6.0.1 Marshmallow.

  • new installation -- error running in "Android Mode" The keytool seems to be missing

    Have you run android apps in your phone before using Eclipse or Android Studio? In other words, have you enabled your usb debug mode in your phone? What instructions did you follow (from what source)? This is totally unrelated to keytool but important info before checking some other options.
    Also, what Processing version and what API target are you working with?

    From my experience, there is no need to generate a keyTool. We need to investigate a bit further...

    For the example code to run, it is important you specify the size of the sketch in setup(), or preferably in settings():

    void settings(){
      fullScreen();
    }
     
    setup(){
     
    } 
     
    void draw(){
      background(int(random(256)));
      fill(0);
      rect(width*0.25,height*0.25,width*0.75,height*0.75);
    }
    

    Kf

  • new installation -- error running in "Android Mode" The keytool seems to be missing

    OS Platform: Debian Jessie

    I am just starting a tutorial on processing.

    When running the first very simple program I get an error at the key-generating phase: program "/home/ibanja/dev/android/processing/processing-3.2.3/java/bin/keytool": error=2, No such file or directory

    The code is cut and pasted from the tutorial and runs fine in "Java mode" so I don't think that is the problem.

    The program code is:

    void  setup()
    {
    }
    void  draw()
    {
            ellipse(mouseX,  mouseY,  mouseX-pmouseX,  mouseY-pmouseY);
    }
    

    I have tried running the following command with no success:

    $ keytool -genkey -alias AndroidDebugKey -keyalg RSA -dname "CN=Android Debug,O=Android,C=US" -validity 10950 -keypass android -keystore /home/ibanja/.android/debug.keystore -storepass android
    Exception in thread "main" java.lang.ExceptionInInitializerError
            at javax.crypto.SecretKeyFactory.nextSpi(java.base@9-ea/SecretKeyFactory.java:303)
            at javax.crypto.SecretKeyFactory.<init>(java.base@9-ea/SecretKeyFactory.java:121)
            at javax.crypto.SecretKeyFactory.getInstance(java.base@9-ea/SecretKeyFactory.java:168)
            at sun.security.pkcs12.PKCS12KeyStore.getPBEKey(java.base@9-ea/PKCS12KeyStore.java:823)
            at sun.security.pkcs12.PKCS12KeyStore.encryptPrivateKey(java.base@9-ea/PKCS12KeyStore.java:892)
            at sun.security.pkcs12.PKCS12KeyStore.setKeyEntry(java.base@9-ea/PKCS12KeyStore.java:600)
            at sun.security.pkcs12.PKCS12KeyStore.engineSetKeyEntry(java.base@9-ea/PKCS12KeyStore.java:560)
            at sun.security.util.KeyStoreDelegator.engineSetKeyEntry(java.base@9-ea/KeyStoreDelegator.java:111)
            at java.security.KeyStore.setKeyEntry(java.base@9-ea/KeyStore.java:1162)
            at sun.security.tools.keytool.Main.doGenKeyPair(java.base@9-ea/Main.java:1729)
            at sun.security.tools.keytool.Main.doCommands(java.base@9-ea/Main.java:1054)
            at sun.security.tools.keytool.Main.run(java.base@9-ea/Main.java:375)
            at sun.security.tools.keytool.Main.main(java.base@9-ea/Main.java:368)
    Caused by: java.lang.SecurityException: Can not initialize cryptographic mechanism
            at javax.crypto.JceSecurity.<clinit>(java.base@9-ea/JceSecurity.java:91)
            ... 13 more
    Caused by: java.lang.NullPointerException
            at sun.nio.fs.UnixPath.normalizeAndCheck(java.base@9-ea/UnixPath.java:75)
            at sun.nio.fs.UnixPath.<init>(java.base@9-ea/UnixPath.java:69)
            at sun.nio.fs.UnixFileSystem.getPath(java.base@9-ea/UnixFileSystem.java:280)
            at java.nio.file.Paths.get(java.base@9-ea/Paths.java:84)
            at javax.crypto.JceSecurity.setupJurisdictionPolicies(java.base@9-ea/JceSecurity.java:254)
            at javax.crypto.JceSecurity.access$000(java.base@9-ea/JceSecurity.java:49)
            at javax.crypto.JceSecurity$1.run(java.base@9-ea/JceSecurity.java:82)
            at javax.crypto.JceSecurity$1.run(java.base@9-ea/JceSecurity.java:79)
            at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
            at javax.crypto.JceSecurity.<clinit>(java.base@9-ea/JceSecurity.java:78)
            ... 13 more
    

    Is there a way to generate the key or install the keytool into /home/ibanja/dev/android/processing/processing-3.2.3/java/bin/? Is that even the problem?

  • Android mode doesn't recognize orientation and fullScreen functions

    Notice warning doesn't affect your program. I will focus on the error below. Unfortunately I can't help anymore.

    Kf

    BUILD FAILED /home/erlandas/sketchbook/modes/AndroidMode/sdk/tools/ant/build.xml:958: The following error occurred while executing this line: /home/erlandas/sketchbook/modes/AndroidMode/sdk/tools/ant/build.xml:969: The following error occurred while executing this line: /home/erlandas/sketchbook/modes/AndroidMode/sdk/tools/ant/build.xml:312: com.android.sdklib.build.ApkCreationException: Failed to create key: Cannot run program "/opt/processing-3.2.3/java/bin/keytool": error=2, No such file or directory JAVA_HOME is set to: /opt/processing-3.2.3/java Update it if necessary, or manually execute the following command:

  • Android mode doesn't recognize orientation and fullScreen functions

    target sdk is 6.0(23), I'm using processing 3.2.3 on linux. The errors are:

        [mkdir] Created dir: /tmp/android4839318928279415303sketch/bin
         [echo] org.eclipse.jdt.core.JDTCompilerAdapter
    
    -set-mode-check:
    
    -set-debug-files:
    
    -check-env:
    Android SDK Tools Revision 25.2.4
    Installed at /home/erlandas/sketchbook/modes/AndroidMode/sdk
    
    -setup:
         [echo] Project Name: sketch_161220b
    Project Type: Application
    
    -set-debug-mode:
    
    -debug-obfuscation-check:
    
    -pre-build:
    
    -build-setup:
    Using latest Build Tools: 25.0.2
         [echo] Resolving Build Target for sketch_161220b...
    Project Target:   Android 6.0
    API level:        23
         [echo] ----------
         [echo] Creating output directories if needed...
        [mkdir] Created dir: /tmp/android4839318928279415303sketch/bin/res
        [mkdir] Created dir: /tmp/android4839318928279415303sketch/bin/rsObj
        [mkdir] Created dir: /tmp/android4839318928279415303sketch/bin/rsLibs
        [mkdir] Created dir: /tmp/android4839318928279415303sketch/gen
        [mkdir] Created dir: /tmp/android4839318928279415303sketch/bin/classes
        [mkdir] Created dir: /tmp/android4839318928279415303sketch/bin/dexedLibs
         [echo] ----------
         [echo] Resolving Dependencies for sketch_161220b...
    Library dependencies:
    No Libraries
    
    ------------------
         [echo] ----------
         [echo] Building Libraries with 'debug'...
       [subant] No sub-builds to iterate on
    
    -code-gen:
    Merging AndroidManifest files into one.
    Manifest merger disabled. Using project manifest only.
         [echo] Handling aidl files...
    No AIDL files to compile.
         [echo] ----------
         [echo] Handling RenderScript files...
         [echo] ----------
         [echo] Handling Resources...
    Generating resource IDs...
         [echo] ----------
         [echo] Handling BuildConfig class...
    Generating BuildConfig class.
    
    -pre-compile:
    
    -compile:
        [javac] Compiling 4 source files to /tmp/android4839318928279415303sketch/bin/classes
    ----------
    1. WARNING in /tmp/android4839318928279415303sketch/src/processing/test/sketch_161220b/MainActivity.java (at line 11)
        import android.support.v4.content.ContextCompat;
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    The import android.support.v4.content.ContextCompat is never used
    ----------
    2. WARNING in /tmp/android4839318928279415303sketch/src/processing/test/sketch_161220b/MainActivity.java (at line 15)
        import android.Manifest;
               ^^^^^^^^^^^^^^^^
    The import android.Manifest is never used
    ----------
    3. WARNING in /tmp/android4839318928279415303sketch/src/processing/test/sketch_161220b/MainActivity.java (at line 49)
        int check;
            ^^^^^
    The value of the local variable check is not used
    ----------
    ----------
    4. WARNING in /tmp/android4839318928279415303sketch/src/processing/test/sketch_161220b/sketch_161220b.java (at line 4)
        import processing.data.*; 
               ^^^^^^^^^^^^^^^
    The import processing.data is never used
    ----------
    5. WARNING in /tmp/android4839318928279415303sketch/src/processing/test/sketch_161220b/sketch_161220b.java (at line 5)
        import processing.event.*; 
               ^^^^^^^^^^^^^^^^
    The import processing.event is never used
    ----------
    6. WARNING in /tmp/android4839318928279415303sketch/src/processing/test/sketch_161220b/sketch_161220b.java (at line 6)
        import processing.opengl.*; 
               ^^^^^^^^^^^^^^^^^
    The import processing.opengl is never used
    ----------
    7. WARNING in /tmp/android4839318928279415303sketch/src/processing/test/sketch_161220b/sketch_161220b.java (at line 8)
        import java.util.HashMap; 
               ^^^^^^^^^^^^^^^^^
    The import java.util.HashMap is never used
    ----------
    8. WARNING in /tmp/android4839318928279415303sketch/src/processing/test/sketch_161220b/sketch_161220b.java (at line 9)
        import java.util.ArrayList; 
               ^^^^^^^^^^^^^^^^^^^
    The import java.util.ArrayList is never used
    ----------
    9. WARNING in /tmp/android4839318928279415303sketch/src/processing/test/sketch_161220b/sketch_161220b.java (at line 10)
        import java.io.File; 
               ^^^^^^^^^^^^
    The import java.io.File is never used
    ----------
    10. WARNING in /tmp/android4839318928279415303sketch/src/processing/test/sketch_161220b/sketch_161220b.java (at line 11)
        import java.io.BufferedReader; 
               ^^^^^^^^^^^^^^^^^^^^^^
    The import java.io.BufferedReader is never used
    ----------
    11. WARNING in /tmp/android4839318928279415303sketch/src/processing/test/sketch_161220b/sketch_161220b.java (at line 12)
        import java.io.PrintWriter; 
               ^^^^^^^^^^^^^^^^^^^
    The import java.io.PrintWriter is never used
    ----------
    12. WARNING in /tmp/android4839318928279415303sketch/src/processing/test/sketch_161220b/sketch_161220b.java (at line 13)
        import java.io.InputStream; 
               ^^^^^^^^^^^^^^^^^^^
    The import java.io.InputStream is never used
    ----------
    13. WARNING in /tmp/android4839318928279415303sketch/src/processing/test/sketch_161220b/sketch_161220b.java (at line 14)
        import java.io.OutputStream; 
               ^^^^^^^^^^^^^^^^^^^^
    The import java.io.OutputStream is never used
    ----------
    14. WARNING in /tmp/android4839318928279415303sketch/src/processing/test/sketch_161220b/sketch_161220b.java (at line 15)
        import java.io.IOException; 
               ^^^^^^^^^^^^^^^^^^^
    The import java.io.IOException is never used
    ----------
    14 problems (14 warnings)
    
    -post-compile:
    
    -obfuscate:
    
    -dex:
    input: /tmp/android4839318928279415303sketch/bin/classes
    input: /tmp/android4839318928279415303sketch/libs/android-support-v4.jar
    input: /tmp/android4839318928279415303sketch/libs/processing-core.jar
    Pre-Dexing /tmp/android4839318928279415303sketch/libs/android-support-v4.jar -> android-support-v4-bdf3ec486bc9f8247ac728ca4b2af593.jar
    Pre-Dexing /tmp/android4839318928279415303sketch/libs/processing-core.jar -> processing-core-cec89870a876e352002a0ed4879dbf6f.jar
    Converting compiled files and external libraries into /tmp/android4839318928279415303sketch/bin/classes.dex...
           [dx] Merged dex #1 (9 defs/5.8KiB)
           [dx] Merged dex #2 (1153 defs/1127.0KiB)
           [dx] Merged dex #3 (160 defs/685.2KiB)
           [dx] Result is 1322 defs/2228.7KiB. Took 0.6s
    
    -crunch:
       [crunch] Crunching PNG Files in source dir: /tmp/android4839318928279415303sketch/res
       [crunch] To destination dir: /tmp/android4839318928279415303sketch/bin/res
       [crunch] Processing image to cache: /tmp/android4839318928279415303sketch/res/drawable-hdpi/icon.png => /tmp/android4839318928279415303sketch/bin/res/drawable-hdpi/icon.png
       [crunch]   (processed image to cache entry /tmp/android4839318928279415303sketch/bin/res/drawable-hdpi/icon.png: 52% size of source)
       [crunch] Processing image to cache: /tmp/android4839318928279415303sketch/res/drawable-ldpi/icon.png => /tmp/android4839318928279415303sketch/bin/res/drawable-ldpi/icon.png
       [crunch]   (processed image to cache entry /tmp/android4839318928279415303sketch/bin/res/drawable-ldpi/icon.png: 0% size of source)
       [crunch] Processing image to cache: /tmp/android4839318928279415303sketch/res/drawable-xhdpi/icon.png => /tmp/android4839318928279415303sketch/bin/res/drawable-xhdpi/icon.png
       [crunch]   (processed image to cache entry /tmp/android4839318928279415303sketch/bin/res/drawable-xhdpi/icon.png: 74% size of source)
       [crunch] Processing image to cache: /tmp/android4839318928279415303sketch/res/drawable-xxhdpi/icon.png => /tmp/android4839318928279415303sketch/bin/res/drawable-xxhdpi/icon.png
       [crunch]   (processed image to cache entry /tmp/android4839318928279415303sketch/bin/res/drawable-xxhdpi/icon.png: 80% size of source)
       [crunch] Processing image to cache: /tmp/android4839318928279415303sketch/res/drawable-xxxhdpi/icon.png => /tmp/android4839318928279415303sketch/bin/res/drawable-xxxhdpi/icon.png
       [crunch]   (processed image to cache entry /tmp/android4839318928279415303sketch/bin/res/drawable-xxxhdpi/icon.png: 95% size of source)
       [crunch] Processing image to cache: /tmp/android4839318928279415303sketch/res/drawable/icon.png => /tmp/android4839318928279415303sketch/bin/res/drawable/icon.png
       [crunch]   (processed image to cache entry /tmp/android4839318928279415303sketch/bin/res/drawable/icon.png: 84% size of source)
       [crunch] Crunched 6 PNG files to update cache
    
    -package-resources:
    Creating full resource package...
         [aapt] Warning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android); using existing value in manifest.
    
    -package:
    Current build type is different than previous build: forced apkbuilder run.
    Creating sketch_161220b-debug-unaligned.apk and signing it with a debug key...
    
    BUILD FAILED
    /home/erlandas/sketchbook/modes/AndroidMode/sdk/tools/ant/build.xml:958: The following error occurred while executing this line:
    /home/erlandas/sketchbook/modes/AndroidMode/sdk/tools/ant/build.xml:969: The following error occurred while executing this line:
    /home/erlandas/sketchbook/modes/AndroidMode/sdk/tools/ant/build.xml:312: com.android.sdklib.build.ApkCreationException: Failed to create key: Cannot run program "/opt/processing-3.2.3/java/bin/keytool": error=2, No such file or directory
    JAVA_HOME is set to: /opt/processing-3.2.3/java
    Update it if necessary, or manually execute the following command:
    /opt/processing-3.2.3/java/bin/keytool -genkey -alias AndroidDebugKey -keyalg RSA -dname "CN=Android Debug,O=Android,C=US" -validity 10950 -keypass android -keystore /home/erlandas/.android/debug.keystore -storepass android
        at com.android.sdklib.build.ApkBuilder.getDebugKey(ApkBuilder.java:300)
        at com.android.sdklib.build.ApkBuilder.<init>(ApkBuilder.java:392)
        at com.android.ant.ApkBuilderTask.execute(ApkBuilderTask.java:334)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
        at com.android.ant.IfElseTask.execute(IfElseTask.java:124)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
        at com.android.ant.IfElseTask.execute(IfElseTask.java:124)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at processing.mode.android.AndroidBuild.antBuild(AndroidBuild.java:525)
        at processing.mode.android.AndroidBuild.build(AndroidBuild.java:96)
        at processing.mode.android.AndroidMode.handleRunDevice(AndroidMode.java:295)
        at processing.mode.android.AndroidEditor$16.run(AndroidEditor.java:553)
    

    Total time: 20 seconds

  • I can't create the Signed app Package

    Hello! I don't really understand this error...

    Can you help me ?


    java.io.IOException: Cannot run program "/home/desktop/processing-3.2.1/java/bin/keytool": error=2, Aucun fichier ou dossier de ce type at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at java.lang.Runtime.exec(Runtime.java:620) at java.lang.Runtime.exec(Runtime.java:485) at processing.mode.android.AndroidKeyStore.generateKeyStore(AndroidKeyStore.java:80) at processing.mode.android.KeyStoreManager$1.actionPerformed(KeyStoreManager.java:94) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6533) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6298) at java.awt.Container.processEvent(Container.java:2236) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) at java.awt.Container.dispatchEventImpl(Container.java:2280) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) Caused by: java.io.IOException: error=2, Aucun fichier ou dossier de ce type at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(UNIXProcess.java:247) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 40 more

  • Error 2 -> Ubuntu 14.04 + Processing 3.0b5

    Hi, I have managed to get things to work!

    Update it if necessary, or manually execute the following command: /home/gorazd/Dokumenti/processing-3.0b5/java/bin/keytool -genkey -alias AndroidDebugKey -keyalg RSA -dname "CN=Android Debug,O=Android,C=US" -validity 10950 -keypass android -keystore

    Had to edit the path to the keytool in my java folder.

    Now it's time to have some fun!

  • Error 2 -> Ubuntu 14.04 + Processing 3.0b5

    Hi there,

    I have a problem running processing in linux. Ubuntu is my only OS, so no other systems installed (Winodws or similar). I belive I have Java correctly installed. If I enter echo $JAVA_HOME, I get the right answer -> /usr/lib/jvm/.

    If I check in console the java version I get this java version "1.7.0_95" OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.2) OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

    If I check javac version -> javac 1.7.0_95

    If I try to compile a simple sketch in processing, I get Error 2 -> JAVA_HOME is set to: /home/gorazd/Dokumenti/processing-3.0b5/java

    I'm trying to figure it out why is Processing trying to get java from other location ?

    Update it if necessary, or manually execute the following command: /home/gorazd/Dokumenti/processing-3.0b5/java/bin/keytool -genkey -alias AndroidDebugKey -keyalg RSA -dname "CN=Android Debug,O=Android,C=US" -validity 10950 -keypass android -keystore

    This statement fails miserably, there is no keytool in this directory.

    I have to state, that I'm not a Linux power user - I'm still a rookie and my linux knowledge is very limited. So If there is anyone kind enough to give me some step by step answer / help I would very appreciate.

    Regards.

  • BUILD FAILED ("error=2, No such file or directory")

    did you try the manual command?

    /home/en/processing-3.0.1/java/bin/keytool -genkey -alias AndroidDebugKey -keyalg RSA -dname "CN=Android Debug,O=Android,C=US" -validity 10950 -keypass android -keystore /home/en/.android/debug.keystore -storepass android

  • BUILD FAILED ("error=2, No such file or directory")
    BUILD FAILED
    /home/en/android-sdk-linux/tools/ant/build.xml:958: The following error occurred while executing this line:
    /home/en/android-sdk-linux/tools/ant/build.xml:969: The following error occurred while executing this line:
    /home/en/android-sdk-linux/tools/ant/build.xml:312: com.android.sdklib.build.ApkCreationException: Failed to create key: Cannot run program "/home/en/processing-3.0.1/java/bin/keytool": error=2, Nincs ilyen fájl vagy könyvtár
    JAVA_HOME is set to: /home/en/processing-3.0.1/java
    Update it if necessary, or manually execute the following command:
    /home/en/processing-3.0.1/java/bin/keytool -genkey -alias AndroidDebugKey -keyalg RSA -dname "CN=Android Debug,O=Android,C=US" -validity 10950 -keypass android -keystore /home/en/.android/debug.keystore -storepass android
        at com.android.sdklib.build.ApkBuilder.getDebugKey(ApkBuilder.java:300)
        at com.android.sdklib.build.ApkBuilder.<init>(ApkBuilder.java:392)
        at com.android.ant.ApkBuilderTask.execute(ApkBuilderTask.java:334)
    .
    .
    .
    
    Total time: 20 seconds
    

    OS: LinuxMint 17.2 64bit, but on Windows 8.1 64bit also there's the error. Processing version: 3.0.1, 3.0.2 (in 3.0.2 when I start writing code, it says The "PApplet" class does not exist.). I've installed API 10,15,19 and Android tools. My device and the requested API is selected. USB-debugging on.

    And I'm trying to run this simply code:

        void setup(){
          size(displayWidth,displayHeight);
          background(#FF9900);
          noStroke();
        }
    
        void draw(){
          ellipse(random(0,width),random(0,height),30,30);
        }
    

    Could somebody help me please? :)

  • Problem with Android Keystore Manager

    Hello everybody! When i try to export an android signed package and i put the password (the first time) appears in the console:

    java.io.IOException: Cannot run program "/home/pedro/Escritorio/processing-3.0/java/bin/keytool": error=2, No existe el archivo o el directorio at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at java.lang.Runtime.exec(Runtime.java:620) at java.lang.Runtime.exec(Runtime.java:485) at processing.mode.android.AndroidKeyStore.generateKeyStore(AndroidKeyStore.java:59) at processing.mode.android.KeyStoreManager$1.actionPerformed(KeyStoreManager.java:73) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6525) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6290) at java.awt.Container.processEvent(Container.java:2234) at java.awt.Component.dispatchEventImpl(Component.java:4881) at java.awt.Container.dispatchEventImpl(Container.java:2292) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462) at java.awt.Container.dispatchEventImpl(Container.java:2278) at java.awt.Window.dispatchEventImpl(Window.java:2750) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) Caused by: java.io.IOException: error=2, No existe el archivo o el directorio at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(UNIXProcess.java:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 40 more java.io.IOException: Cannot run program "/home/pedro/Escritorio/processing-3.0/java/bin/keytool": error=2, No existe el archivo o el directorio at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at java.lang.Runtime.exec(Runtime.java:620) at java.lang.Runtime.exec(Runtime.java:485) at processing.mode.android.AndroidKeyStore.generateKeyStore(AndroidKeyStore.java:59) at processing.mode.android.KeyStoreManager$1.actionPerformed(KeyStoreManager.java:73) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6525) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6290) at java.awt.Container.processEvent(Container.java:2234) at java.awt.Component.dispatchEventImpl(Component.java:4881) at java.awt.Container.dispatchEventImpl(Container.java:2292) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462) at java.awt.Container.dispatchEventImpl(Container.java:2278) at java.awt.Window.dispatchEventImpl(Window.java:2750) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) Caused by: java.io.IOException: error=2, No existe el archivo o el directorio at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(UNIXProcess.java:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 40 more

    I just want to generate the APK. That happends on processing 3.0 running on Linux. I tried to install android mode on Windows, but says that an error occurred. Neither with processing 1.5.1 or 2.2.1. I wish you could help me! Thanks! :)

  • keytool error when running a script in android mode

    Hey! Sorry to revive this thread, but I have a solution. If you have freshly installed the android SDK and Processing 3.0.x, you probably won't have an APK key. Processing 3.0 offers to install it locally (inside it's java/ directory) but if you already had java, the keytool binary is probably already on your path.

    I had similar errors, so I ran

    keytool -genkey -alias AndroidDebugKey -keyalg RSA -dname "CN=Android Debug,O=Android,C=US" -validity 10950 -keypass android -keystore /home/midas/.android/debug.keystore -storepass android

    which generated the key I needed to make the Android mode of Processing just work. Note; you should replace my keystore path with your own. If I had to guess... I'd say you should run this command:

    keytool -genkey -alias AndroidDebugKey -keyalg RSA -dname "CN=Android Debug,O=Android,C=US" -validity 10950 -keypass android -keystore /home/richard/.android/debug.keystore -storepass android

  • keytool error when running a script in android mode

    OK i have managed to partially solve the problem: I found that the path variable i had set in /etc/environment was slightly wrong and once i had set that and then used the keytool command from the command line things seemed to be going OK then i got the following error:

    -post-build:

    debug: Emulator process exited with status 1. EmulatorController: Emulator never booted. NOT_RUNNING Error while starting the emulator. (NOT_RUNNING) Shutting down any existing adb server...

    Processing also gives the following: "Lost connection with device while launching. Try agian".

    Anybody have any ideas on what is going on here?

    Any help is much appreciated.

    Cheers.

  • keytool error when running a script in android mode

    Hi, I am running processing 3.0b5 with the latest android version. The PC is running linux mint 17.1.

    When trying to run a simple script i get the following error when trying to run in the emulator: BUILD FAILED /home/richard/Dev/processing-3.0b5/android-sdk-linux/tools/ant/build.xml:958: The following error occurred while executing this line: /home/richard/Dev/processing-3.0b5/android-sdk-linux/tools/ant/build.xml:969: The following error occurred while executing this line: /home/richard/Dev/processing-3.0b5/android-sdk-linux/tools/ant/build.xml:312: com.android.sdklib.build.ApkCreationException: Failed to create key: Cannot run program "/opt/processing3/java/bin/keytool": error=2, No such file or directory JAVA_HOME is set to: /opt/processing3/java

    I have altered the /etc/environment file to point the PATH and JAVA_HOME to the the Java-7-oracle directory: sudo nano /etc/environment PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-7-oracle" JAVA_HOME=/usr/lib/jvm/java-7-oracle

    and this seems to have been accepted: ~ $ echo $JAVA_HOME /usr/lib/jvm/java-7-oracle ~ $ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-7-oracle $ which java /usr/bin/java

    However i am still getting the error indicating that JAVA_HOME is still set to /opt/processing3/java.

    It seems that i am doing something wrong with setting teh environment variables maybe. Does anybody know how to fix this?

    Any help is much appreciated.

    Cheers.

  • Signing

    Okay, so I found "keytool" in Library/java/ and moved a copy into /Applications/Processing.app/Contents/PlugIns/jdk1.7.0_55.jdk/Contents/Home/jre/bin/ But now I'm getting a long list of java.lang.Exception errors. My Java is version 8, update 25 Anyone got this working, or see the same error?

  • Signing

    The "Export Signed Package" button is now active, but I get the error. "java.io.IOException: Cannot run program "/Applications/Processing.app/Contents/PlugIns/jdk1.7.0_55.jdk/Contents/Home/jre/bin/keytool": error=2, No such file or directory"

    When I look, this file is indeed missing. Did I miss a step somehow? Or is this feature still not ready for prime time? mac 10.9.5 Processing 2.2.1

  • "Error from inside the Android tools, check the console." with Processing 3.0a4?

    Hi! Thanks for the reply. Still haven't figured out the problem... Yes it has a lot of noise... Below is a copy&paste from the console:

    java.io.FileNotFoundException: /Volumes/Coisas/Users/marcoheleno/Documents/Processing/modes/AndroidMode/icons/icon-96.png (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:146) at processing.app.Base.copyFile(Base.java:2489) at processing.mode.android.AndroidBuild.writeRes(AndroidBuild.java:806) at processing.mode.android.AndroidBuild.createProject(AndroidBuild.java:168) at processing.mode.android.AndroidBuild.build(AndroidBuild.java:90) at processing.mode.android.AndroidMode.handleRunDevice(AndroidMode.java:227) at processing.mode.android.AndroidEditor$16.run(AndroidEditor.java:513) [mkdir] Created dir: /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin [echo] /Applications/Processing3.0a4.app/Contents/Java/tools/../modes/Java/mode/ecj.jar [echo] org.eclipse.jdt.core.JDTCompilerAdapter

    -set-mode-check:

    -set-debug-files:

    -check-env: Android SDK Tools Revision 23.0.2 Installed at /Volumes/Coisas/Users/marcoheleno/Documents/Processing/modes/AndroidMode/sdk

    -setup: [echo] Project Name: Particles Project Type: Application

    -set-debug-mode:

    -debug-obfuscation-check:

    -pre-build:

    -build-setup: Using latest Build Tools: 20.0.0 [echo] Resolving Build Target for Particles... Project Target: Android 2.3.3 API level: 10 [echo] ---------- [echo] Creating output directories if needed... [mkdir] Created dir: /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin/res [mkdir] Created dir: /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin/rsObj [mkdir] Created dir: /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin/rsLibs [mkdir] Created dir: /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/gen [mkdir] Created dir: /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin/classes [mkdir] Created dir: /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin/dexedLibs [echo] ---------- [echo] Resolving Dependencies for Particles... Library dependencies: No Libraries


    API<=15: Adding annotations.jar to the classpath. [echo] ---------- [echo] Building Libraries with 'debug'... [subant] No sub-builds to iterate on

    -code-gen: Merging AndroidManifest files into one. Manifest merger disabled. Using project manifest only. [echo] Handling aidl files... No AIDL files to compile. [echo] ---------- [echo] Handling RenderScript files... [echo] ---------- [echo] Handling Resources... Generating resource IDs... [echo] ---------- [echo] Handling BuildConfig class... Generating BuildConfig class.

    -pre-compile:

    -compile:

    [javac] Compiling 3 source files to /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin/classes

    1. WARNING in /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/src/processing/test/particles/Particles.java (at line 4) import processing.data.*; ^^^^^^^^^^^^^^^

    The import processing.data is never used

    1. WARNING in /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/src/processing/test/particles/Particles.java (at line 5) import processing.event.*; ^^^^^^^^^^^^^^^^

    The import processing.event is never used

    1. WARNING in /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/src/processing/test/particles/Particles.java (at line 6) import processing.opengl.*; ^^^^^^^^^^^^^^^^^

    The import processing.opengl is never used

    1. WARNING in /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/src/processing/test/particles/Particles.java (at line 8) import java.util.HashMap; ^^^^^^^^^^^^^^^^^

    The import java.util.HashMap is never used

    1. WARNING in /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/src/processing/test/particles/Particles.java (at line 10) import java.io.File; ^^^^^^^^^^^^

    The import java.io.File is never used

    1. WARNING in /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/src/processing/test/particles/Particles.java (at line 11) import java.io.BufferedReader; ^^^^^^^^^^^^^^^^^^^^^^

    The import java.io.BufferedReader is never used

    1. WARNING in /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/src/processing/test/particles/Particles.java (at line 12) import java.io.PrintWriter; ^^^^^^^^^^^^^^^^^^^

    The import java.io.PrintWriter is never used

    1. WARNING in /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/src/processing/test/particles/Particles.java (at line 13) import java.io.InputStream; ^^^^^^^^^^^^^^^^^^^

    The import java.io.InputStream is never used

    1. WARNING in /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/src/processing/test/particles/Particles.java (at line 14) import java.io.OutputStream; ^^^^^^^^^^^^^^^^^^^^

    The import java.io.OutputStream is never used

    1. WARNING in /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/src/processing/test/particles/Particles.java (at line 15) import java.io.IOException; ^^^^^^^^^^^^^^^^^^^

    The import java.io.IOException is never used

    10 problems (10 warnings) -post-compile:

    -obfuscate:

    -dex: input: /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin/classes input: /Volumes/Coisas/Users/marcoheleno/Documents/Processing/modes/AndroidMode/sdk/tools/support/annotations.jar input: /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/libs/processing-core.jar Pre-Dexing /Volumes/Coisas/Users/marcoheleno/Documents/Processing/modes/AndroidMode/sdk/tools/support/annotations.jar -> annotations-00755a947f11f6bfcd3ce01b28387ce2.jar Pre-Dexing /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/libs/processing-core.jar -> processing-core-141c15b72304ed9e8813e70530fdd906.jar Converting compiled files and external libraries into /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin/classes.dex... [dx] Merged dex A (8 defs/5.8KiB) with dex B (2 defs/1.1KiB). Result is 10 defs/7.3KiB. Took 0.1s [dx] Merged dex A (10 defs/7.3KiB) with dex B (233 defs/782.1KiB). Result is 243 defs/929.4KiB. Took 0.5s

    -crunch: [crunch] Crunching PNG Files in source dir: /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/res [crunch] To destination dir: /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin/res [crunch] Processing image to cache: /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/res/drawable-hdpi/icon.png => /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin/res/drawable-hdpi/icon.png [crunch] (processed image to cache entry /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin/res/drawable-hdpi/icon.png: 47% size of source) [crunch] Processing image to cache: /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/res/drawable-ldpi/icon.png => /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin/res/drawable-ldpi/icon.png [crunch] (processed image to cache entry /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin/res/drawable-ldpi/icon.png: 0% size of source) [crunch] Processing image to cache: /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/res/drawable/icon.png => /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin/res/drawable/icon.png [crunch] (processed image to cache entry /var/folders/cg/4k70t6r97kxbntbt82lzm3vm0000gn/T/android3327690112633183153sketch/bin/res/drawable/icon.png: 0% size of source) [crunch] Crunched 3 PNG files to update cache

    -package-resources: Creating full resource package... [aapt] Warning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android); using existing value in manifest.

    -package: Current build type is different than previous build: forced apkbuilder run. Creating Particles-debug-unaligned.apk and signing it with a debug key...

    BUILD FAILED /Volumes/Coisas/Users/marcoheleno/Documents/Processing/modes/AndroidMode/sdk/tools/ant/build.xml:962: The following error occurred while executing this line: /Volumes/Coisas/Users/marcoheleno/Documents/Processing/modes/AndroidMode/sdk/tools/ant/build.xml:973: The following error occurred while executing this line: /Volumes/Coisas/Users/marcoheleno/Documents/Processing/modes/AndroidMode/sdk/tools/ant/build.xml:312: com.android.sdklib.build.ApkCreationException: Failed to create key: Cannot run program "/Applications/Processing3.0a4.app/Contents/PlugIns/jdk1.7.0_67.jdk/Contents/Home/jre/bin/keytool": error=13, Permission denied JAVA_HOME is set to: /Applications/Processing3.0a4.app/Contents/PlugIns/jdk1.7.0_67.jdk/Contents/Home/jre Update it if necessary, or manually execute the following command: /Applications/Processing3.0a4.app/Contents/PlugIns/jdk1.7.0_67.jdk/Contents/Home/jre/bin/keytool -genkey -alias AndroidDebugKey -keyalg RSA -dname "CN=Android Debug,O=Android,C=US" -validity 10950 -keypass android -keystore /Volumes/Coisas/Users/marcoheleno/.android/debug.keystore -storepass android at com.android.sdklib.build.ApkBuilder.getDebugKey(ApkBuilder.java:300) at com.android.sdklib.build.ApkBuilder.(ApkBuilder.java:392) at com.android.ant.ApkBuilderTask.execute(ApkBuilderTask.java:334) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) at com.android.ant.IfElseTask.execute(IfElseTask.java:124) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) at com.android.ant.IfElseTask.execute(IfElseTask.java:124) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.Project.executeTarget(Project.java:1368) at processing.mode.android.AndroidBuild.antBuild(AndroidBuild.java:514) at processing.mode.android.AndroidBuild.build(AndroidBuild.java:92) at processing.mode.android.AndroidMode.handleRunDevice(AndroidMode.java:227) at processing.mode.android.AndroidEditor$16.run(AndroidEditor.java:513)

    Total time: 20 seconds

  • Build Error 720

    I needed to do all steps again, because of a new system install. It stays difficult. Just to help others:

    Creating the symlink to javac (in the path of stc it couldn't be found):

    theproce55.tumblr.com/post/82883027743/fixing-android-development-in-processing-2-1-1

    ln -s /Library/Java/Home/bin/javac javac

    I got a permission denied and found out that I didn't had root access. Solution: azchipka.thechipkahouse.com/enabling-root-user-mavericks-mac-os-10-9/7567/

    Surf again to the right directory in the terminal (in my case): cd /Applications/Processing.app/Contents/PlugIns/jdk1.7.0_55.jdk/Contents/Home/jre/bin/ ln -s /Library/Java/Home/bin/javac javac

    Dont' forget the keytool (see post above).

    Also don't forget to create an emulator: forum.processing.org/two/discussion/3093/emulator-in-android-mode-does-not-work/#Item_7

  • Build Error 720

    Ok, it's an known and still open issue on Github: https://github.com/processing/processing-android/issues/60.

    I tried the offered "solution" but this gives me another error.

    Solution: - Go to Terminal. - cd /Applications/Processing.app/Contents/PlugIns/jdk1.7.0_45.jdk/Contents/ Home/jre/bin - run: ln -s /Library/Java/Home/bin/javac javac

    Run on Device gives the error below:

    BUILD FAILED
    /Developer/AndroidSDK/tools/ant/build.xml:962: The following error occurred while executing this line:
    /Developer/AndroidSDK/tools/ant/build.xml:973: The following error occurred while executing this line:
    /Developer/AndroidSDK/tools/ant/build.xml:313: com.android.sdklib.build.ApkCreationException: Failed to create key: Cannot run program "/Applications/Processing.app/Contents/PlugIns/jdk1.7.0_55.jdk/Contents/Home/jre/bin/keytool": error=2, No such file or directory
    JAVA_HOME is set to: /Applications/Processing.app/Contents/PlugIns/jdk1.7.0_55.jdk/Contents/Home/jre
    Update it if necessary, or manually execute the following command:
    /Applications/Processing.app/Contents/PlugIns/jdk1.7.0_55.jdk/Contents/Home/jre/bin/keytool -genkey -alias AndroidDebugKey -keyalg RSA -dname "CN=Android Debug,O=Android,C=US" -validity 10950 -keypass android -keystore /Users/kasperkamperman/.android/debug.keystore -storepass android
        at com.android.sdklib.build.ApkBuilder.getDebugKey(ApkBuilder.java:300)
    
    • copy-paste this whole line from the error in the still open Terminal (below it has my own user directory "kasperkamperman", but this is unique for your own system)

    • run: keytool -genkey -alias AndroidDebugKey -keyalg RSA -dname "CN=Android Debug,O=Android,C=US" -validity 10950 -keypass android -keystore /Users/kasperkamperman/.android/debug.keystore -storepass android

    Run on Device works (my Samsung Galaxy II)!

    Run in Emulator keeps giving me errors, but that could be caused by something else.