Reputation: 361
I am trying to run the Arduino ADK + Android examples (analogRead, digitalWrite, etc.) But I am getting the following compile error:
-compile:
[javac] Compiling 3 source files to C:\Users\???\AppData\Local\Temp\android7678598093798196219sketch\bin\classes
[javac] C:\Users\???\AppData\Local\Temp\android7678598093798196219sketch\src\processing\android\test\adk_analogRead.java:28: cannot access com.android.future.usb.UsbAccessory
[javac] class file for com.android.future.usb.UsbAccessory not found
[javac] arduino.connect( arduino.list()[0] );
[javac] ^
[javac] 1 error
I did some research and found this 9 months old post - http://forum.processing.org/topic/how-can-you-specify-the-target-api-level - where it talks about recompile Processing from source. However, I'm using version 2.0a5 and the team has already changed the source to use API level 10. (I also verified the generated code when I look inside the manifest xml file in temp folder.) Any idea how to fix this?
Just in case, I've successfully compiled and ran regular Processing app and deployed to Android (Nexus One.)
Upvotes: 1
Views: 1832
Reputation: 151
Here's what I did to get the ArduinoAdkUsb examples to compile:
Upvotes: 0
Reputation: 90
To use ADK, you can use API Level 10, but it needs to have the Google APIs attached (same thing you need to use Maps in your application).
If you're having trouble enabling the Google APIs, try switching to API level 12, where you no longer need the addon. However you'll now be using the android.hardware.usb library instead of com.android.future.usb.
Upvotes: 1