Android Studio 使用过程遇到的坑
最近在尝试Android Studio打Jar的包,然而事实并不是想象的那么简单,so,写多个坑的解决,以备不时之需。
1.Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
> Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.
解决:build.gradle文件中把26.0.0都换成27.1.1 即可以正常编译。
2.Error:FAILURE: Build failed with an exception.
// What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
//Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
不积跬步,无以至千里;不积小流,无以成江海。