Android studio 使用常见问题解决思路:
问题一:
Error: Execution failed for task
':app:processDebugResources'. >
com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException:
Process 'command 'C:\Users\Vishnu Ruhela\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe'' finished with non- zero exit value 1
这个问题在我们更新Android studio 的时候很遇到;
解决方法:
***Method 1:***
-Go to File->project structure->Project
Check Android plugin Version and change it to 1.3.0(Latest one)
-Go to File->project structure->app->Properties->Build Tools Version
-Change it to latest one(22.0.1). Also do this for any other module you have for your project.
-Clean and build project.
**Note:** If your build tool version is less than 22.0.1 then you may still face same error while gradle build so please update your SDK from SDK Manager to latest one then restart android studio and follow above steps.
***Method 2:***
-If you don't want to update build tools version or you don't have latest SDK version just Go to File->project structure->Project.
-Check Android plugin Version and change it to 1.0.0(Older one)
-Clean and build project.
I recommended Method 1.
这里提个对应问题:project 的
Gradle version
对应的是gradle-wrapper.properties
文件中的
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
,
Android Plugin Version
对应的是 build.gradle
中的 classpath 'com.android.tools.build:gradle:2.2.0-alpha6'
再这里看这两个的最新版本:
http://services.gradle.org/distributions
https://jcenter.bintray.com/com/android/tools/build/gradle/
问题二:
[com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException:
Process 'command 'C:\Program Files\Java\jdk1.7.0_51\bin\java.exe'' finished with non-zero exit value 1]
这个问题就直接给出解决方法:
defaultConfig {
// Enabling multidex support.
multiDexEnabled true
}