intellij idea建立完android項目編譯的時候報錯。以前都沒事的

Information:Gradle: Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources]
Information:2015/4/8 17:05 - Compilation completed with 2 errors and 0 warnings in 29s 30ms
Error:Gradle: Execution failed for task ':app:processDebugResources'.android

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'E:\PublicFile\android\android-sdk_r24.1.2-windows\android-sdk-windows\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
H:\IdeaProiectsAndroid\XListTest\app\build\intermediates\manifests\full\debug\AndroidManifest.xml
Error:Error:line (13)Gradle: No resource found that matches the given name (at 'icon' with value '@drawable/ic_launcher').windows

 

解決辦法:app

這個是你的build.gradle的兼容包和compileSdkVersion配置不對引發的有兩個解決方法:一個是所有升級成最新 的,appcompat-v7:21.0.0須使用android 5.0版本的build tool,並且build出來的程序只能在Android 5.0下運行,另一個方法就是本身動手支修改build.gradle有參數把 compileSdkVersion=19,targetSdkVersion 19,兼容包改爲compile 'com.android.support:appcompat-v7:19.+'這樣就能夠了。但願對你有用!ide

相關文章
相關標籤/搜索