- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我正在尝试学习本教程:
http://www.gdgankara.org/2012/11/01/step-by-step-android-development-with-maven/
但是在设置环境并创建一个项目之后,在“运行为\maven 安装”步骤我得到了这个:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building tutorial 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- android-maven-plugin:3.1.1:generate-sources (default-generate-sources) @ tutorial ---
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.889s
[INFO] Finished at: Sat May 18 00:32:12 CEST 2013
[INFO] Final Memory: 8M/111M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources (default-generate-sources) on project tutorial: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources failed: Could not find tool 'aapt'. Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
我尝试了很多次,但都没有成功。我在 Windows7 64 位上安装了 Eclipse Juno,安装了 APK 工具和 Maven 3.0.5。
对于 maven 员工来说,这似乎是一个众所周知的问题:
https://code.google.com/p/maven-android-plugin/issues/detail?id=104
但它应该从岁月中解决......
我的环境用户变量:
M2_HOME=C:\Program Files\Java\apache-maven-3.0.5
ANDROID_HOME=C:\adt-bundle-windows-x86_64-20130514\sdk
我的环境系统变量:
Path=......;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\build-tools;%ANDROID_HOME%\platforms;%M2_HOME%\bin;%ANDROID_HOME%\build-tools\android-4.2.2
有人知道如何锻炼这个陷阱吗?
谢谢!
最佳答案
我在使用google最新的ADT并尝试编译bootstrap android平台时也遇到了同样的问题。
最新的 r17 构建分离出 aapt
到 build-tools 文件夹。因此它是 maven-android-plugin 无法支持的。
查看讨论的问题 here .
尝试并工作:
cd $ANDROID_HOME/platform-tools
ln -s ../build-tools/android-4.2.2/aapt aapt
ln -s ../build-tools/android-4.2.2/lib lib
ln -s ../build-tools/android-4.2.2/aidl aidl
某些安装可能使用 API 版本进行结构化:
cd $ANDROID_HOME/platform-tools
ln -s ../build-tools/17.0.0/aapt aapt
ln -s ../build-tools/17.0.0/lib lib
ln -s ../build-tools/17.0.0/aidl aidl
请记住,正如其他答案所指出的,这已在最新版本 (>3.5.3) 的 Android Maven 插件中得到修复。
关于Android Maven 找不到工具 'aapt',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16619143/
调试了3天还是没解决。如果你们中有人知道问题的根源以及我如何解决它,那我会很高兴?请原谅我不知道有更好的方法来粘贴错误消息。 错误日志: Cause 1: java.util.concurrent.E
最近,我将我的 android-SDK 升级到了 Android M(API 22,MNC 预览版)。之后,每个项目打开Eclipse都报错。 错误说:“执行 aapt 时出错。请检查 aapt 是否
我在 Visual Studio 2017 中有一个 cordova 应用程序项目,到目前为止一直在构建良好。没有对项目进行任何更改。 现在我们遇到了这个构建错误: 1>MSBUILD : cordo
每当我尝试在一些更改后第二次运行 android 项目时,我都会收到此错误。如果我关闭模拟器错误消失。但是每次都关闭模拟器不是一个可行的解决方案。我应该怎么做才能摆脱这个问题? Description
当我尝试构建和运行 Flutter 应用程序时,它向我显示以下消息: “无法找到 aapt。请确保您已安装 Android 构建工具。 异常(exception):构建 Android 应用程序时出现
我有一个奇怪的问题。在我的 bash 脚本或 Makefile 中,使用带有绝对路径的 aapt 不起作用,但如果我在本地目录中,它就起作用了。 如果我执行以下操作,它不起作用: aapt add $
aapt的输出格式是什么? 例如检查这里的输出 http://elinux.org/Android_aapt config 0 lang=-- cnt=-- orien=0 touch=0 densi
我已经尝试通过 Java 程序执行 aapt 命令已有一段时间了。我的预感是我应该使用 runtime.exec() 命令来实现这一点。但是,我查看了其他问题和答案,但似乎没有一个对我有用。命令是:
尝试使用 Maven 构建 Android 项目,我们无法使用它使用 google play services apklib 编译它。 我已经尝试从 apklib 中删除所有语言,只保留默认语言,它似
我想在带有 android sdk(文件夹/build-tools/24.0.1)的 Mac 上使用 aapt 命令。但是每当我尝试使用该命令时,我都会收到一条消息,提示找不到该命令 (aapt/aa
当我在 Windows 7 下列出正在运行的进程时,大约有 20 个 aapt.exe 进程正在显示,它们占用了大量内存。打开 android studio 时会发生这种情况。我总是被迫退出 andr
我的 Android 项目有一个 Ant 构建脚本。我正在使用 aapt 来打包各种资源文件。我想要解压缩资源文件。我试过“-0”标志,但文件仍然被压缩!但是当我通过 Eclipse 构建时,资源文件
我刚刚更新了 ADT,而不是 SDK,现在我只有一个项目存在这个问题,即我的 aapt 没有找到 Error executing aapt. Please check aapt is present
在使用eclipse进行安卓java的编程的时候,有时候我们会遇到这样的问题:那就是无故弹出aapt.exe停止工作的提示,虽然程序不会崩溃,但是这个提示经常弹出很是烦人。今天,小编就来教大家aap
我在使用 aapt 将资源打包到 apk 时遇到了一些麻烦。 .没有 @drawable/[...] 时一切正常或 @styles/[...]我的 AndroidManifest.xml 中的方向.但
我正在尝试将lib com.android.support:preference-v7:23.1.0导入到我的项目中。 但是,当我添加 compile ("com.android.support:pr
我尝试使用 android studio 构建一个 android 应用程序。当我尝试构建时,Gradle 抛出此错误: Gradle invocation completed successfull
我想以编程方式创建打包的资源文件(这就是问题),直接在 Android 手机上运行的应用程序中创建。有没有办法在手机上执行“aapt.exe”,或者有其他方法从java库创建resource._rsc
最近我一直在尝试构建一个 Android NDK 应用程序,该应用程序在过去编译和打包时没有问题。但是由于系统更新或 SDK 更新,有些东西发生了变化,现在当我尝试构建应用程序时,出现以下错误: /h
我有原始资源,偶尔会在构建之间交换或修改,但文件名不会更改,而 aapt 不会合并这些更改;它使用以前版本的 bin/MyThing.ap_(我猜这是他们被藏起来的地方)。来自 ant debug:
我是一名优秀的程序员,十分优秀!