Android--Gradle build finished with 232 error(s) in 1m 43s
2017-05-09 16:57
423 查看
Android–Gradle build finished with 232 error(s) in 1m 43s
What is this?(这是啥?)
这些很多可能性是我们在Android 的开发过程中使用了过时的javaAPI,或者不太规范的编程,所以这232个error,其实是232个warnings, 所以如果我们可以编译通过,就代表并没有什么错,我们可以使用以下几种方式解决1解决方法
以下都是在Gradle中加// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' classpath 'com.jakewharton:butterknife-gradle-plugin:8.5.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() //Bmob的maven仓库地址--必填 maven { url "https://raw.github.com/bmob/bmob-android-sdk/master" } gradle.projectsEvaluated { tasks.withType(JavaCompile){ options.compilerArgs << "-Xmaxerrs" << "1000" } } } } task clean(type: Delete) { delete rootProject.buildDir }
1. 加入下列代码,把最大Error数调大
gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs << "-Xmaxerrs" << "1000" } }
2. 加入下列代码,不检查warning
allprojects { gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" } } }
参考
如何加入编译选项相关文章推荐
- 安卓项目从eplices转移到安卓studio 报错 Gradle build finished with 216 error(s) in 1m 0s 133ms
- 解决Gradle build finished with 744 error(s) in 4m 33s 896ms。同时加快build apk即生成app的过程
- Android Studio Gradle build finished with 1 error(s) in 3s 721ms
- android studio 不能生成apk:Gradle build finished with 1 error(s) in 5 sec Unexpected error Local path do
- Gradle build finished with 200 error(s)
- android studio error:'D:\ProgramSoft\android-ndk-r10e\ndk-build.cmd'' finished with non-zero exit
- Android Studio Build Error : This version of Android Studio is incompatible with the Gradle Plugin u
- android studio 的 Gradle build finished with 1 error(s) 问题
- Android Studio Build Error : This version of Android Studio is incompatible with the Gradle Plugin u
- Error:Could not get unknown property ‘apkVariantData’ for object of type com.android.build.gradle.in
- Gradle build error, Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug
- 使用gradle编译:重复jar包导致的错误Error:'...jdk1.8.0\bin\java.exe'' finished with non-zero exit value 2
- Android Studio BUILD FAILED finished with non-zero exit value
- Android Build with Gradle and ProGuard : “The output jar must be specified after an input jar, or it
- Error:Execution failed for ..dk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1错误
- Android Studio下“Error:Could not find com.android.tools.build:gradle:2.2.1”的解决方法
- Android Gradle Build Error:Some file crunching failed, see logs for details解决办法
- Java finished with non-zero exit value 2 - Android Gradle
- Android - 警告:it is always overridden by the value specified in the Gradle build script