本文介绍了编译的Arduino ADK +的Andr​​oid +处理错误示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图运行的Arduino ADK + Android的例子(analogRead,digitalWrite等),但我得到以下编译错误:

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

我做了一些研究,发现这9个月后 - 的 - 它讲述的重新编译处理,从源头。不过,我使用的版本2.0a5和球队已经改变源使用的API 10级。(我也验证了产生code,当我看着在临时文件夹中的清单XML文件中。)任何想法如何解决这一问题?

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?

以防万一,我已经成功地编译和运行常规处理的应用程序并将其部署到Android(Nexus One的。)

Just in case, I've successfully compiled and ran regular Processing app and deployed to Android (Nexus One.)

推荐答案

要使用ADK,你可以使用API​​等级10,但它需要有谷歌API的连接(你需要在你的应用程序中使用的地图同样的事情)。

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).

如果您无法使谷歌的API,尝试切换到API级别12,你不再需要插件。但是你现在可以使用com.android.future.usb的android.hardware.usb库,而不是

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.

这篇关于编译的Arduino ADK +的Andr​​oid +处理错误示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 16:43