ADK和Eclipse的困境 - com.android.future和USBAccessory?困境、Eclipse、ADK、com

2023-09-05 02:24:21 作者:Liberty 【自主】

我想获得 ADK(附件开发工具包)建立与Eclipse,但更新到API的12后,运行在DEMOKIT世界您好,我得到了29错误,最初的几个看起来像:

com.android.future不能得到解决,等等
UsbAccessory不能被解析为一个类型

解决方案

您需要设置您的构建目标谷歌的API,而不是机器人。点击项目 - >属性,然后在对话框中选择代替的Andr​​oid 2.3.3谷歌的API(2.3.3)。

如何将工程从Eclipse 迁移到Android Studio

I am trying to get ADK (Accessory Development Kit) set up with Eclipse, but after updating to API 12, to run the demokit Hello World, I get the 29 errors, the first few looking like:

com.android.future cannot be resolved, etc
UsbAccessory cannot be resolved to a type

解决方案

You need to set your build target to Google APIs, not Android. Click on Project->Properties, then in the dialog box, select Google APIs (2.3.3) instead of Android 2.3.3.