2015-11-16 78 views
1

我试过任何解决方案建议尝试解决aapt.exe错误。每当我试图添加一个新的依赖项到build.gradle我得到这个错误,并删除依赖项后,错误消失。 我试过编译SDK,更改构建工具版本,无效/清除缓存,并行地激活编译独立模块。 注册的唯一依赖性是:完成非零退出值错误

signingConfigs { compile fileTree(include: '*.jar', dir: 'libs') 
     compile project(':android-support-v7-appcompat') 
     compile files('libs/android-integration-3.2.1.jar') 
     compile files('libs/android-core-3.2.1.jar') 

我如何处理它,如果我需要另一个依赖添加到我的项目?

我工作的机器人工作室1.4.1 compileSdkVersion 19 buildToolsVersion '22 .0.1'

+0

您是否在defaultConfig Gradle文件中添加了'multiDexEnabled true'? –

+0

为什么你的依赖关系在'signingConfigs'内? – Mannaz

回答

0

你应该被添加在build.gradle您的依赖库(模块:应用程序),如果您要添加任何库使用Android Studio GUI,最终会在此处添加该库,或者如果您手动将库放入libs并将其添加到项目库中,它仍将添加到此处。

请检查在何处以及如何被你添加在上面的代码GSON库的依赖

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:23.1.0' 
    compile 'com.android.support:design:23.1.0' 
    compile 'com.android.support:support-v4:23.1.0' 
    compile 'com.google.code.gson:gson:2.4' 
    compile files('libs/commons-io-2.4.jar') 
} 

是通过将它添加compile 'com.google.code.gson:gson:2.4'使用过Android Studio GUI和

阿帕奇通用IO加入compile files('libs/commons-io-2.4.jar') 添加在Android项目中的libs目录中的库

+0

没有但仍然..我不能通过android studio GUI添加任何库。我当前的build.gradle依赖关系是:依赖项编译文件树(包括'* .jar',dir:'libs') 编译项目(':android-support-v7-appcompat') 编译文件('libs/android-core-3.2.1.jar') 编译文件('libs/android-integration-3.2.1.jar') } –

+0

你在这里得到什么错误?如果可能的话,在你的问题中发布你的build.gradle –

+0

实际上,只有当我通过将lib(.jar文件)放在android项目目录中才能添加它们时,依赖关系才起作用 –

相关问题