Java Gradle can';无法在命令行中构建Android项目,aapt失败
我已经创建了一个基本的Android项目 现在,当我在命令行中运行gradle(2.10版)时,我得到以下错误:Java Gradle can';无法在命令行中构建Android项目,aapt失败,java,android,gradle,Java,Android,Gradle,我已经创建了一个基本的Android项目 现在,当我在命令行中运行gradle(2.10版)时,我得到以下错误: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':processDebugResources'. > com.android.ide.common.process.ProcessException: org.gradle.process.interna
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/opt/android-sdk/build-tools/23.0.2/aapt'' finished with non-zero exit value 1
这是我的build.gradle文件:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
}
这是我的AndroidManifest.xml文件:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.hello"
android:versionCode="1"
android:versionName="1.0.0" >
<application android:label="@string/app_name" >
<activity
android:name=".HelloActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
有趣的是,当我启动androidstudio(1.5)并在那里构建一个测试应用程序时,它工作得很好,但在命令行中这样做失败了。我试图从AS复制gradle文件,但没有成功。我检查了安装路径,aapt应该在那里
几个月前,我在上面用了同样的指南,我在这里完全迷路了。今天我更新了我的Android SDK安装(编辑:我确保安装了正确的版本),但我无法正确构建任何内容
如果您需要更多信息,请告诉我,我被卡住了。我自己解决了。重新安装Gradle后,我终于收到一条新的错误消息,用简单的英语告诉我出了什么问题(这是我的资源出了问题) 这真的很奇怪,因为我以前使用Archlinux和所有其他Gradle更新都工作得很好
无论如何,感谢所有考虑过这一点的人:)您能显示您的命令行吗?