与build.xml文件使用Android ADK的问题时有一个Arduino巨型ADK沟通 [英] Problems with build.xml when using the Android ADK to communicate with an Arduino Mega ADK

查看:260
本文介绍了与build.xml文件使用Android ADK的问题时有一个Arduino巨型ADK沟通的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以前几天我得到了我的手放在一个Arduino巨型ADK板,最后几晚我一直在建立我的开发环境,让交手的工具等工具和库都做工精细,比如我可以写在处理IDE编译和华硕的Eee Pad TF101变压器运行运行Android 4.03的程序。但是,当我得到它尝试编译和运行的pre-写的例子之一,它给了我一个编译器错误:

So a few days ago I got my hands on an Arduino Mega ADK board, and the last couple of nights I have been setting up my development environment, getting to grips with the tools etc. The tools and libraries all work fine, for example I can get a program written in the Processing IDE to compile and run on an Asus Eee Pad Transformer TF101 running Android 4.03. But when I get it to try to compile and run one of the pre-written examples, it gives me a compiler error:

Android SDK工具修订20
在安装在C:\\ NVPACK \\ Android的SDK窗口
项目类型:应用程序
项目目标:Android的2.3.3
API等级:10
库依赖关系:
没有库

Android SDK Tools Revision 20 Installed at C:\NVPACK\android-sdk-windows Project Type: Application Project Target: Android 2.3.3 API level: 10 Library dependencies: No Libraries

&API LT; = 15:添加annotations.jar到classpath中。
合并AndroidManifest文件合并成一个。
清单合并禁用。使用项目清单而已。
没有AIDL文件进行编译。
没有RenderScript文件进行编译。
生成资源ID ...
生成BuildConfig类。

API<=15: Adding annotations.jar to the classpath. Merging AndroidManifest files into one. Manifest merger disabled. Using project manifest only. No AIDL files to compile. No RenderScript files to compile. Generating resource IDs... Generating BuildConfig class.

构建失败
C:\\ NVPACK \\ Android的SDK-WINDOWS \\工具\\蚂蚁\\的build.xml:6​​80:执行此线出现以下错误:
C:\\ NVPACK \\ Android的SDK-WINDOWS \\工具\\蚂蚁\\的build.xml:6​​93:编译失败;详情请参见编译器错误输出。

BUILD FAILED C:\NVPACK\android-sdk-windows\tools\ant\build.xml:680: The following error occurred while executing this line: C:\NVPACK\android-sdk-windows\tools\ant\build.xml:693: Compile failed; see the compiler error output for details.

总时间:7秒

而这一切,在控制台似乎输出为好,这是相当令人沮丧,!至于我知道我所有的SDK版本,工具和插件都是最新的。我已经试过这使用的是Linux分区,我有我的硬盘驱动器,它产生同样的错误消息,但它提到与包com.Android.future.UsbAccessory一个问题。鉴于我所看到的,似乎问题出在工具,无论是我的目录结构不匹配正确的设置是什么,或者别的东西是错误的:秒。如果任何人有过类似的问题,有些帮助将是粉碎! (根据记录,我的设置是使用Arduino的网站上的说明来完成,虽然我已经安装了Android SDK工具)。
请问斯科特 - 杰克逊

And that's all the console seems to output as well, which is rather frustrating! As far as I'm aware all of my SDK versions, tools and plugins are all up to date. I've tried this using a Linux partition I have on my hard drive and it produces the same error message, although it mentions a problem with the package com.Android.future.UsbAccessory. Given what I've seen, it seems that the problem is with the tools, either my directory structure doesn't match up to what the correct setup is, or something else is wrong :S. If anyone has had similar problems, some help would be smashing! (For the record, my setup was done using the instructions on the Arduino website, although I already had the Android SDK tools installed). Will Scott-Jackson

推荐答案

这听起来像你有没有在的支持库您的项目和/或你还没有下载到你的Andr​​oid SDK。

It sounds like your haven't added in the support library to your project and/or you haven't downloaded it into your Android SDK.

该ADK1演示套件应用目标API级别10(Android版2.3.3);这意味着你需要使用支持库中的项目,这就是为什么编译器抱怨不被用10级库的依赖。支持库位于 SDK管理器单独下载,所以你可能没有他们在你的开发环境。

The ADK1 demokit app targets API Level 10 (Android 2.3.3); That means you need to use the support libraries in your project and that's why the compiler is complaining about level 10 library dependencies not being available. The support libraries are a separate download in the SDK Manager, so you might not have them in your development environment.

在的Andr​​oid API级别12或更高时,USB附件协议加入到该框架的API,所以有两种不同的方式使用附件协议。所以,你不这样做的有无的使用支持库,如果你的目标蜂窝和更高的版本,但你必须更新演示套件应用code,使这项工作。

In Android API Level 12 and higher, the USB Accessory protocol was added to the framework API, so there are two different ways to use the accessory protocol. So, you don't have to use the support libraries if you are targeting Honeycomb and higher versions, but you'll have to update the demokit app code to make this work.

希望这有助于。

这篇关于与build.xml文件使用Android ADK的问题时有一个Arduino巨型ADK沟通的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆