I'm running Processing 2.02 in Windows 8, have jre 7 installed, running an emulator created for API level 11, using the latest Minim version (as of 9/20/2013).
I wrote a test sketch to make sure I can run things to the emulator (a canvas 100x100 green with a simple line drawn). This works.
I then wrote a sketch to test out Minim playing a mp3 sound snippet. The mp3 file is about 201K and is in the data folder
The sketch works in java but fails when I switched to Android mode.
Can someone please help guide me to get it running. Thank you in advance.
Below is the sketch and the error I received.
********************sketch:
// libraries
import ddf.minim.*;
// audio variables
Minim myMinim;
AudioSnippet textReading;
void setup() {
size(100, 100);
background(0, 255, 0);
myMinim = new Minim(this);
textReading = myMinim.loadSnippet("testmp3.mp3");
}// setup
void draw() {
}
void mouseReleased() {
textReading.play();
}
void stop() {
myMinim.stop();
super.stop();
}// stop
********************Error:
-set-mode-check:
-set-debug-files:
-check-env:
Android SDK Tools Revision 22.0.5
Installed at C:\Program Files\Android Dev\adt-bundle-windows-x86_64-20130522\sdk
-setup:
[echo] Project Name: MinimTest
Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
Using latest Build Tools: 18.0.1
[echo] Resolving Build Target for MinimTest...
Project Target: Android 2.3.3
API level: 10
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin
[mkdir] Created dir: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\res
[mkdir] Created dir: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\gen
[mkdir] Created dir: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\classes
[mkdir] Created dir: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\dexedLibs
[echo] ----------
[echo] Resolving Dependencies for MinimTest...
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...
No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Since compiler setting isn't classic or modern, ignoring fork setting.
[javac] Since compiler setting isn't classic or modern, ignoring fork setting.
[javac] Since compiler setting isn't classic or modern, ignoring fork setting.
[javac] Compiling 3 source files to C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\classes
[javac] Since compiler setting isn't classic or modern, ignoring fork setting.
-post-compile:
-obfuscate:
-dex:
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\classes
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\tritonus_share.jar
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\jsminim.jar
input: C:\Program Files\Android Dev\adt-bundle-windows-x86_64-20130522\sdk\tools\support\annotations.jar
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\jl1.0.jar
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\minim-spi.jar
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\tritonus_aos.jar
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\processing-core.jar
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\mp3spi1.9.4.jar
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\minim.jar
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\tritonus_share.jar -> tritonus_share-b6d5ebf3498becd7314acb09ee50ee61.jar
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\jsminim.jar -> jsminim-37a170b812a37fcdf54a284ce829fb48.jar
Pre-Dexing C:\Program Files\Android Dev\adt-bundle-windows-x86_64-20130522\sdk\tools\support\annotations.jar -> annotations-5bb5e647d3334c19b47fe55a902089cd.jar
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\jl1.0.jar -> jl1.0-f8114eeeaec793a662c40cd62656e050.jar
[dx] warning: Ignoring InnerClasses attribute for an anonymous inner class
[dx] (javazoom.jl.player.advanced.jlap$1) that doesn't come with an
[dx] associated EnclosingMethod attribute. This class was probably produced by a
[dx] compiler that did not target the modern .class file format. The recommended
[dx] solution is to recompile the class from source, using an up-to-date compiler
[dx] and without specifying any "-target" type options. The consequence of ignoring
[dx] this warning is that reflective operations on this class will incorrectly
[dx] indicate that it is *not* an inner class.
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\minim-spi.jar -> minim-spi-899fa8b87b02513411d01f3e8da37c4e.jar
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\tritonus_aos.jar -> tritonus_aos-5c3fbfa837e596a8e6812f133f5f977b.jar
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\processing-core.jar -> processing-core-df7ce97b00843b9591fd37f32a1c2127.jar
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\mp3spi1.9.4.jar -> mp3spi1.9.4-82fbb5cf02387ac19e821ee3e225cc71.jar
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\minim.jar -> minim-69173193f5e8de2f5f7713053e0b6972.jar
Converting compiled files and external libraries into C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\classes.dex...
[dx] Merged dex A (6 defs/2.4KiB) with dex B (62 defs/116.7KiB). Result is 68 defs/142.7KiB. Took 0.1s
[dx] Merged dex A (68 defs/142.7KiB) with dex B (17 defs/58.2KiB). Result is 85 defs/250.8KiB. Took 0.1s
[dx] Merged dex A (85 defs/250.8KiB) with dex B (2 defs/1.1KiB). Result is 87 defs/333.2KiB. Took 0.1s
[dx] Merged dex A (87 defs/333.2KiB) with dex B (71 defs/220.9KiB). Result is 158 defs/747.7KiB. Took 0.1s
[dx] Merged dex A (158 defs/747.7KiB) with dex B (7 defs/2.8KiB). Result is 165 defs/1075.4KiB. Took 0.1s
[dx] Result compacted from 1665.6KiB to 395.5KiB to save 1270.1KiB
[dx] Merged dex A (165 defs/1075.4KiB) with dex B (6 defs/10.8KiB). Result is 171 defs/395.5KiB. Took 0.1s
[dx] Merged dex A (171 defs/395.5KiB) with dex B (203 defs/686.6KiB). Result is 374 defs/1288.9KiB. Took 0.2s
[dx] Merged dex A (374 defs/1288.9KiB) with dex B (18 defs/32.3KiB). Result is 392 defs/1602.3KiB. Took 0.2s
[dx] Merged dex A (392 defs/1602.3KiB) with dex B (51 defs/61.7KiB). Result is 443 defs/2076.3KiB. Took 0.2s
-crunch:
[crunch] Crunching PNG Files in source dir: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\res
[crunch] To destination dir: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\res
[crunch] Processing image to cache: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\res\drawable-hdpi\icon.png => C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\res\drawable-hdpi\icon.png
[crunch] (processed image to cache entry C:\Users\Susanna\AppData\Local\Temp\android6547311200665
[crunch] 692sketch\bin\res\drawable-hdpi\icon.png: 47% size of source)
[crunch] Processing image to cache: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\res\drawable-ldpi\icon.png => C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\res\drawable-ldpi\icon.png
[crunch] (processed image to cache entry C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\res\drawable-ldpi\icon.png: 0% size of source)
[crunch] Processing image to cache: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\res\drawable\icon.png => C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\res\drawable\icon.png
[crunch] (processed image to cache entry C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\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 MinimTest-debug-unaligned.apk and signing it with a debug key...
-post-package:
-do-debug:
Running zip align on final apk...
[echo] Debug Package: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\MinimTest-debug.apk
[propertyfile] Creating new property file: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\build.prop
[propertyfile] Updating property file: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\build.prop
[propertyfile] Updating property file: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\build.prop
[propertyfile] Updating property file: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\build.prop
-post-build:
debug:
FATAL EXCEPTION: Animation Thread
java.lang.ExceptionInInitializerError
at processing.test.minimtest.MinimTest.setup(MinimTest.java:31)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PGraphicsAndroid2D.requestDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:1019)
Caused by: java.lang.NoClassDefFoundError: javax.sound.sampled.AudioFileFormat$Type
at ddf.minim.Minim.<clinit>(Minim.java:65)
... 5 more
I wrote a test sketch to make sure I can run things to the emulator (a canvas 100x100 green with a simple line drawn). This works.
I then wrote a sketch to test out Minim playing a mp3 sound snippet. The mp3 file is about 201K and is in the data folder
The sketch works in java but fails when I switched to Android mode.
Can someone please help guide me to get it running. Thank you in advance.
Below is the sketch and the error I received.
********************sketch:
// libraries
import ddf.minim.*;
// audio variables
Minim myMinim;
AudioSnippet textReading;
void setup() {
size(100, 100);
background(0, 255, 0);
myMinim = new Minim(this);
textReading = myMinim.loadSnippet("testmp3.mp3");
}// setup
void draw() {
}
void mouseReleased() {
textReading.play();
}
void stop() {
myMinim.stop();
super.stop();
}// stop
********************Error:
-set-mode-check:
-set-debug-files:
-check-env:
Android SDK Tools Revision 22.0.5
Installed at C:\Program Files\Android Dev\adt-bundle-windows-x86_64-20130522\sdk
-setup:
[echo] Project Name: MinimTest
Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
Using latest Build Tools: 18.0.1
[echo] Resolving Build Target for MinimTest...
Project Target: Android 2.3.3
API level: 10
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin
[mkdir] Created dir: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\res
[mkdir] Created dir: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\gen
[mkdir] Created dir: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\classes
[mkdir] Created dir: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\dexedLibs
[echo] ----------
[echo] Resolving Dependencies for MinimTest...
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...
No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Since compiler setting isn't classic or modern, ignoring fork setting.
[javac] Since compiler setting isn't classic or modern, ignoring fork setting.
[javac] Since compiler setting isn't classic or modern, ignoring fork setting.
[javac] Compiling 3 source files to C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\classes
[javac] Since compiler setting isn't classic or modern, ignoring fork setting.
-post-compile:
-obfuscate:
-dex:
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\classes
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\tritonus_share.jar
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\jsminim.jar
input: C:\Program Files\Android Dev\adt-bundle-windows-x86_64-20130522\sdk\tools\support\annotations.jar
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\jl1.0.jar
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\minim-spi.jar
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\tritonus_aos.jar
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\processing-core.jar
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\mp3spi1.9.4.jar
input: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\minim.jar
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\tritonus_share.jar -> tritonus_share-b6d5ebf3498becd7314acb09ee50ee61.jar
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\jsminim.jar -> jsminim-37a170b812a37fcdf54a284ce829fb48.jar
Pre-Dexing C:\Program Files\Android Dev\adt-bundle-windows-x86_64-20130522\sdk\tools\support\annotations.jar -> annotations-5bb5e647d3334c19b47fe55a902089cd.jar
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\jl1.0.jar -> jl1.0-f8114eeeaec793a662c40cd62656e050.jar
[dx] warning: Ignoring InnerClasses attribute for an anonymous inner class
[dx] (javazoom.jl.player.advanced.jlap$1) that doesn't come with an
[dx] associated EnclosingMethod attribute. This class was probably produced by a
[dx] compiler that did not target the modern .class file format. The recommended
[dx] solution is to recompile the class from source, using an up-to-date compiler
[dx] and without specifying any "-target" type options. The consequence of ignoring
[dx] this warning is that reflective operations on this class will incorrectly
[dx] indicate that it is *not* an inner class.
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\minim-spi.jar -> minim-spi-899fa8b87b02513411d01f3e8da37c4e.jar
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\tritonus_aos.jar -> tritonus_aos-5c3fbfa837e596a8e6812f133f5f977b.jar
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\processing-core.jar -> processing-core-df7ce97b00843b9591fd37f32a1c2127.jar
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\mp3spi1.9.4.jar -> mp3spi1.9.4-82fbb5cf02387ac19e821ee3e225cc71.jar
Pre-Dexing C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\libs\minim.jar -> minim-69173193f5e8de2f5f7713053e0b6972.jar
Converting compiled files and external libraries into C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\classes.dex...
[dx] Merged dex A (6 defs/2.4KiB) with dex B (62 defs/116.7KiB). Result is 68 defs/142.7KiB. Took 0.1s
[dx] Merged dex A (68 defs/142.7KiB) with dex B (17 defs/58.2KiB). Result is 85 defs/250.8KiB. Took 0.1s
[dx] Merged dex A (85 defs/250.8KiB) with dex B (2 defs/1.1KiB). Result is 87 defs/333.2KiB. Took 0.1s
[dx] Merged dex A (87 defs/333.2KiB) with dex B (71 defs/220.9KiB). Result is 158 defs/747.7KiB. Took 0.1s
[dx] Merged dex A (158 defs/747.7KiB) with dex B (7 defs/2.8KiB). Result is 165 defs/1075.4KiB. Took 0.1s
[dx] Result compacted from 1665.6KiB to 395.5KiB to save 1270.1KiB
[dx] Merged dex A (165 defs/1075.4KiB) with dex B (6 defs/10.8KiB). Result is 171 defs/395.5KiB. Took 0.1s
[dx] Merged dex A (171 defs/395.5KiB) with dex B (203 defs/686.6KiB). Result is 374 defs/1288.9KiB. Took 0.2s
[dx] Merged dex A (374 defs/1288.9KiB) with dex B (18 defs/32.3KiB). Result is 392 defs/1602.3KiB. Took 0.2s
[dx] Merged dex A (392 defs/1602.3KiB) with dex B (51 defs/61.7KiB). Result is 443 defs/2076.3KiB. Took 0.2s
-crunch:
[crunch] Crunching PNG Files in source dir: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\res
[crunch] To destination dir: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\res
[crunch] Processing image to cache: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\res\drawable-hdpi\icon.png => C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\res\drawable-hdpi\icon.png
[crunch] (processed image to cache entry C:\Users\Susanna\AppData\Local\Temp\android6547311200665
[crunch] 692sketch\bin\res\drawable-hdpi\icon.png: 47% size of source)
[crunch] Processing image to cache: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\res\drawable-ldpi\icon.png => C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\res\drawable-ldpi\icon.png
[crunch] (processed image to cache entry C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\res\drawable-ldpi\icon.png: 0% size of source)
[crunch] Processing image to cache: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\res\drawable\icon.png => C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\res\drawable\icon.png
[crunch] (processed image to cache entry C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\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 MinimTest-debug-unaligned.apk and signing it with a debug key...
-post-package:
-do-debug:
Running zip align on final apk...
[echo] Debug Package: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\MinimTest-debug.apk
[propertyfile] Creating new property file: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\build.prop
[propertyfile] Updating property file: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\build.prop
[propertyfile] Updating property file: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\build.prop
[propertyfile] Updating property file: C:\Users\Susanna\AppData\Local\Temp\android6547311200665692sketch\bin\build.prop
-post-build:
debug:
FATAL EXCEPTION: Animation Thread
java.lang.ExceptionInInitializerError
at processing.test.minimtest.MinimTest.setup(MinimTest.java:31)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PGraphicsAndroid2D.requestDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:1019)
Caused by: java.lang.NoClassDefFoundError: javax.sound.sampled.AudioFileFormat$Type
at ddf.minim.Minim.<clinit>(Minim.java:65)
... 5 more
1