编译环境
mac 系统
- 找到gradle 脚本的位置
cd /Applications
find ./ -name gradle
路径如下:/Applications/Android Studio.app/Contents/gradle/gradle-2.10/bin/gradle
- 修改 .bash_profile
export GRADLE_HOME=/Applications/Android\ Studio.app/Contents/gradle/gradle-2.10
export PATH=${PATH}:${GRADLE_HOME}/bin
路径中空格之前需要反斜杠
- 命令行中执行: gradle -v 运行成功说明环境配置OK
编译命令
错误1
Error:Execution failed for task ‘:app:processDebugResources’.
>com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘/Users/guoliang.wgl/Library/Android/sdk/build-tools/23.0.2/aapt” finished with non-zero exit value 1
gradle app:processDebugResources -info
可以看到对应task 编译的具体错误