Has ANYBODY had success with procesing > 2.0.3 and Android ???

edited February 2014 in Android Mode

I ran 2.0.3 in Android an all was well. Then upgraded to 2.1 and evertyhing went west. I thought it was some minor bug with an early version of 2.1, and went back to using 2.0.3 again. Then, a few months later, Processing 2.1.1 was released and I thought that this probably was a version in which these bugs were ironed out, but again I just could bring processing work in android mode. So now I'm back to 2.0.3 AGAIN.

And each time I start Processing it tips me to upgrade - but I don't dare. My question is this:

Have anybody actually been able to make Processing 2.1.1 work in android mode?

If not: What is going on?

If so: How are you doing it? Surely not by following the wiki? http://wiki.processing.org/w/Android

Tagged:

Answers

  • I am able to use Processing 2.1.1 Android mode successfully. I believe that other users can as well, but I can't speak for them. There have been numerous posts regarding similar problems throughout the history of Android mode (as far as I can remember).

    What, specifically, is your problem? Do you get some form of stack trace?

  • OK, thanks. This answer alone helps me a lot. At least now I can spend some time trying to get it to work. My big question was if it was any point in trying.

    I'll get back to you with the specifics. I would very much appreciate it if you would help me with this as 2.1.1 is probably better in some ways than 2.0.3.

  • I've tried to recreate the error I'm facing at home on my work computer, but I have have even less luck with that one (Win8.1 64).

    I downloaded 2.1.1 and before running it, downloaded the Android SDK and followed each step in the wiki (http://wiki.processing.org/w/Android).

    Then I started 2.1.1, added the Android mode, restarted it and changed to Android mode. I go a (familiar) popup that ANDROID_SDK was not set. This was the same with 2.0.3 I think and all I had to do was specifying this to Processing another place.

    Trying to compile a simple Android example now fails with Error from inside the Android tools...

    ================================================

    -set-mode-check:

    -set-debug-files:

    -check-env: Android SDK Tools Revision 22.3.0 Installed at C:\Users\rw\AppData\Local\Android\android-sdk

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

    -set-debug-mode:

    -debug-obfuscation-check:

    -pre-build:

    -build-setup: Using latest Build Tools: 19.0.1 [echo] Resolving Build Target for Array... Project Target: Android 2.3.3 API level: 10 [echo] ---------- [echo] Creating output directories if needed... [mkdir] Created dir: C:\Users\rw\AppData\Local\Temp\android5876227450540710931sketch\bin [mkdir] Created dir: C:\Users\rw\AppData\Local\Temp\android5876227450540710931sketch\bin\res [mkdir] Created dir: C:\Users\rw\AppData\Local\Temp\android5876227450540710931sketch\bin\rsObj [mkdir] Created dir: C:\Users\rw\AppData\Local\Temp\android5876227450540710931sketch\bin\rsLibs [mkdir] Created dir: C:\Users\rw\AppData\Local\Temp\android5876227450540710931sketch\gen [mkdir] Created dir: C:\Users\rw\AppData\Local\Temp\android5876227450540710931sketch\bin\classes [mkdir] Created dir: C:\Users\rw\AppData\Local\Temp\android5876227450540710931sketch\bin\dexedLibs [echo] ---------- [echo] Resolving Dependencies for Array... 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 C:\Users\rw\AppData\Local\Temp\android5876227450540710931sketch\bin\classes

    BUILD FAILED C:\Users\rw\AppData\Local\Android\android-sdk\tools\ant\build.xml:720: The following error occurred while executing this line: C:\Users\rw\AppData\Local\Android\android-sdk\tools\ant\build.xml:734: Error running javac.exe compiler

    Total time: 1 second

    I notice that in your tips, you write: Variable ANDROID_HOME should point to the location of the bin folder within the Android folder.

    But I cannot find any bin folder in the Android-sdk ! This can't be right? Where in the SDK is it supposed to be?

    Thanks for any help!

    -Rune

  • I've recently started experimenting with Android mode in Processing 2.1.1 (Rev 0224) and it seems to be working with a few issues. Perhaps this will be of some help to you.

    Here is my setup. I run Windows 7 Professional 64-bit.

    1. Installed Java (64 bit) is installed in C:\Program Files\java
    2. Added C:\Program Files\java\jdk1.7.0_21\bin to my PATH
    3. Installed Android SDK in D:\Tools\adt-bundle-windows-x86_64-20130917
    4. Unzipped and placed Processing in D:\Tools\Processing-2.1.1

    I don't think the actual file locations for the Android SDK or Processing are crucial. However, I've had issues with Java in the past if it wasn't installed in it's default directory on C:\

    I installed Java first, then the Android SDK. I used the Android SDK that comes bundled with Eclipse and had installed the Android 4.2.2 revision and updated it. Then I opened the Android SDK Manager and added Android 2.3.3 to be compatible with Processing.

    I then installed Processing 2.1.1, ran few sketches in Java mode to make sure that part was working correctly and then added Android mode. I run the sketches in Android under the emulator. It takes a short bit to start and occasionally, I have to run the first sketch twice. Once the emulator is up and running, I leave it up until my session is done.

    Currently, I'm running through the Android example sketches to determine which ones work, and which don't. So far, all the sketches I've run have compiled without errors, but several of them will not launch on the emulator. The following message pops up, in this example the MoveEye sketch):

    Sorry! The application MoveEye (process processing.test.moveeye) has stopped unexpectedly. Please try again.

    So, there are still issues even when the code compiles.

    While this response may not address your question directly, I hope it might be useful in some way. Cheers.

  • You need to add the bin folder of the JDK to the PATH variable, that may be the problem - perhaps the wording was confusing...

    @SiriusCG: Do you get a stack trace for your crashes?

  • No stack trace. At least none that I can find. The app compiles fine with no issues in Processing, loads successfully to the emulator, then tosses the aforementioned error.

    I don't currently have a hardware device to test on so I can 't rule out the emulator itself as a possible factor.

  • Does the emulator have support for OpenGL hardware acceleration? This could be the problem...

  • I think you nailed it. It would appear the emulator needs these versions installed:

    Android SDK Tools, Revision 17 or higher
    Android SDK Platform API 15, Revision 3 or higher
    

    to use opengl acceleration.

    In all the example sketches I tested that used either OPENGL, P2D or P3D, the app failed with the aforementioned error. Sketches that did not use any of libraries worked fine.

    Now, if Google would just get the Nexus 11 out on the market. :)

  • It actually seems to work now! Thanks!

    Now I'll try the same thing on my home computer...

  • Good to hear Rune. As I don't have a hardware device to test on at the moment, and if you do, I'd love to hear about your success or failures using graphics on it in Android mode. Cheers.

Sign In or Register to comment.