Open smoothmango opened 10 years ago
Solution found based on comments on improperly filed issue in main Processing repo. You need to create a symbolic link in the Processing.app package to javac
from your system's java installation.
For me that means navigating to
/Applications/Processing.app/Contents/PlugIns/jdk1.7.0_45.jdk/Contents/Home/jre/bin
and running:
ln -s /Library/Java/Home/bin/javac javac
to create the symbolic link in Processing.app
Thanks for this! Worked a treat. I hoe there are plans to fix this issue so you don't need to use the command line to fix it. Still not resolved in 2.1.2
still get error
[taskdef] Could not load definitions from resource emma_ant.properties. It could not be found.
-set-mode-check:
-set-debug-files:
-check-env: Android SDK Tools Revision 23.0.0 Installed at /Applications/Android/sdk
-setup: [echo] Project Name: sketch_140628b 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 sketch_140628b... Project Target: Android 2.3.3 API level: 10 [echo] ---------- [echo] Creating output directories if needed... [mkdir] Created dir: /var/folders/yv/cp4w9xj10sv0xvbgym5125pc0000gn/T/android8248936923325436970sketch/bin [mkdir] Created dir: /var/folders/yv/cp4w9xj10sv0xvbgym5125pc0000gn/T/android8248936923325436970sketch/bin/res [mkdir] Created dir: /var/folders/yv/cp4w9xj10sv0xvbgym5125pc0000gn/T/android8248936923325436970sketch/bin/rsObj [mkdir] Created dir: /var/folders/yv/cp4w9xj10sv0xvbgym5125pc0000gn/T/android8248936923325436970sketch/bin/rsLibs [mkdir] Created dir: /var/folders/yv/cp4w9xj10sv0xvbgym5125pc0000gn/T/android8248936923325436970sketch/gen [mkdir] Created dir: /var/folders/yv/cp4w9xj10sv0xvbgym5125pc0000gn/T/android8248936923325436970sketch/bin/classes [mkdir] Created dir: /var/folders/yv/cp4w9xj10sv0xvbgym5125pc0000gn/T/android8248936923325436970sketch/bin/dexedLibs [echo] ---------- [echo] Resolving Dependencies for sketch_140628b... 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/yv/cp4w9xj10sv0xvbgym5125pc0000gn/T/android8248936923325436970sketch/bin/classes
-post-compile:
-obfuscate:
-dex:
input: /var/folders/yv/cp4w9xj10sv0xvbgym5125pc0000gn/T/android8248936923325436970sketch/bin/classes
input: /Applications/Android/sdk/tools/support/annotations.jar
input: /var/folders/yv/cp4w9xj10sv0xvbgym5125pc0000gn/T/android8248936923325436970sketch/libs/processing-core.jar
Pre-Dexing /var/folders/yv/cp4w9xj10sv0xvbgym5125pc0000gn/T/android8248936923325436970sketch/libs/processing-core.jar -> processing-core-3a195c1200c69bb17bcb3e703526adec.jar
Converting compiled files and external libraries into /var/folders/yv/cp4w9xj10sv0xvbgym5125pc0000gn/T/android8248936923325436970sketch/bin/classes.dex...
[dx]
[dx] UNEXPECTED TOP-LEVEL EXCEPTION:
[dx] java.io.FileNotFoundException: /Applications/Android/sdk/tools/support/annotations.jar (No such file or directory)
[dx] at java.util.zip.ZipFile.open(Native Method)
[dx] at java.util.zip.ZipFile.
BUILD FAILED /Applications/Android/sdk/tools/ant/build.xml:892: The following error occurred while executing this line: /Applications/Android/sdk/tools/ant/build.xml:894: The following error occurred while executing this line: /Applications/Android/sdk/tools/ant/build.xml:906: The following error occurred while executing this line: /Applications/Android/sdk/tools/ant/build.xml:283: null returned: 1
Total time: 9 seconds
I´m having the same issue that wanglongly mentioned above.
[taskdef] Could not load definitions from resource emma_ant.properties. It could not be found.
-set-mode-check:
-set-debug-files:
-check-env: Android SDK Tools Revision 23.0.0 Installed at /Developer/AndroidSDK
-setup: [echo] Project Name: sketch_140628a 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 sketch_140628a... Project Target: Android 2.3.3 API level: 10 [echo] ---------- [echo] Creating output directories if needed... [mkdir] Created dir: /var/folders/jd/02fvlpcx0n10pwz9rx_k_fqc0000gn/T/android2915634894064204307sketch/bin [mkdir] Created dir: /var/folders/jd/02fvlpcx0n10pwz9rx_k_fqc0000gn/T/android2915634894064204307sketch/bin/res [mkdir] Created dir: /var/folders/jd/02fvlpcx0n10pwz9rx_k_fqc0000gn/T/android2915634894064204307sketch/bin/rsObj [mkdir] Created dir: /var/folders/jd/02fvlpcx0n10pwz9rx_k_fqc0000gn/T/android2915634894064204307sketch/bin/rsLibs [mkdir] Created dir: /var/folders/jd/02fvlpcx0n10pwz9rx_k_fqc0000gn/T/android2915634894064204307sketch/gen [mkdir] Created dir: /var/folders/jd/02fvlpcx0n10pwz9rx_k_fqc0000gn/T/android2915634894064204307sketch/bin/classes [mkdir] Created dir: /var/folders/jd/02fvlpcx0n10pwz9rx_k_fqc0000gn/T/android2915634894064204307sketch/bin/dexedLibs [echo] ---------- [echo] Resolving Dependencies for sketch_140628a... 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/jd/02fvlpcx0n10pwz9rx_k_fqc0000gn/T/android2915634894064204307sketch/bin/classes
-post-compile:
-obfuscate:
-dex:
input: /var/folders/jd/02fvlpcx0n10pwz9rx_k_fqc0000gn/T/android2915634894064204307sketch/bin/classes
input: /Developer/AndroidSDK/tools/support/annotations.jar
input: /var/folders/jd/02fvlpcx0n10pwz9rx_k_fqc0000gn/T/android2915634894064204307sketch/libs/processing-core.jar
Pre-Dexing /var/folders/jd/02fvlpcx0n10pwz9rx_k_fqc0000gn/T/android2915634894064204307sketch/libs/processing-core.jar -> processing-core-859a5f843f3fd73bd88252390c5279b7.jar
Converting compiled files and external libraries into /var/folders/jd/02fvlpcx0n10pwz9rx_k_fqc0000gn/T/android2915634894064204307sketch/bin/classes.dex...
[dx]
[dx] UNEXPECTED TOP-LEVEL EXCEPTION:
[dx] java.io.FileNotFoundException: /Developer/AndroidSDK/tools/support/annotations.jar (No such file or directory)
[dx] at java.util.zip.ZipFile.open(Native Method)
[dx] at java.util.zip.ZipFile.
BUILD FAILED /Developer/AndroidSDK/tools/ant/build.xml:892: The following error occurred while executing this line: /Developer/AndroidSDK/tools/ant/build.xml:894: The following error occurred while executing this line: /Developer/AndroidSDK/tools/ant/build.xml:906: The following error occurred while executing this line: /Developer/AndroidSDK/tools/ant/build.xml:283: null returned: 1
Total time: 16 seconds
I solved this on Windows by copying the contents of my JDK folder to the "\java\" subfolder where I had Processing installed. Heavy handed, but it worked.
Just to note, if you try and update the Android SDK location in the preferences.txt file, it gets overwritten . Not sure why they have a preference setting if it is just going to get overwritten every time. Also, setting the "JAVA_HOME" variable did absolutely nothing in my case.
@jones065 i did this on MAC , and can't start processing then....
Hello all
The fix posted up above works for Mac. I re-wrote it a bit and posted it on my blog:
http://theproce55.tumblr.com/post/82883027743/fixing-android-development-in-processing-2-1-1
Same problem here (with Mac OSX), only a bit worse, I think, because there's no javac file anywhere on this computer. I'm guessing we need to download the 200MB-odd JDK from the Oracle site to try and sort this out? It's not a great internet connection, so I'd rather try something else. How come there's no download link for 2.0.3 on the Processing site any more?
There is, it's just not linked. http://download.processing.org/processing-2.0.3-macosx.zip
Ah, thanks @agoransson! Already got the JDK off Oracle and symlinked that, but that didn't work - just claimed to be compiling indefinitely.
2.0.3, however, is working fine. Should I open a separate 'Please keep linking to version 2.0.3 until later versions work with Android' issue, since this seems to be much the easiest solution to this problem?
I just downloaded Processing 2.1.1, and when I try to run my Android sketch, I get the following error in the console:
[javac] Unable to locate an executable at "/Applications/Processing.app/Contents/PlugIns/jdk1.7.0_51.jdk/Contents/Home/jre/bin/javac" (-1)
If I open the Processing.app package and navigate to the mentioned folder, I find an executable calledjava
but nothing calledjavac
. I tried renamingjava
tojavac
but this just creates more (and different) errors.