在 Android Studio v3.1.1 中生成构建 apk 时如何修复 checkReleaseBuilds false
How to fix checkReleaseBuilds false when generate build apk in Android Studio v3.1.1
我在 Android studio v3.1.1.
中开发了一个 android 应用程序
我的项目已经完成,我想从 Build -> Generate Build Apk generate apk 但在第二次显示 Logcat
中的以下错误之后:
Lint found fatal errors while assembling a release target.
To proceed, either fix the issues identified by lint, or modify your build script as follows:
...
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
...
我该如何解决?请帮助我
你收到的消息告诉了你需要知道的一切。修复导致此消息的 lint 错误(查看文档 here 了解如何 运行 lint 以及在哪里可以找到包含详细信息的完整报告),或者将 checkReleaseBuilds false
添加到 lintOptions
块在你的 build.gradle 文件中。
在您应用的 build.gradle
中添加以下 lintOptions
块。
android {
defaultConfig {
...
}
buildTypes {
...
}
lintOptions {
// Returns whether lint should be quiet (for example, not write informational messages such as paths to report files written)
quiet true
// Whether lint should set the exit code of the process if errors are found
abortOnError false
// Returns whether lint will only check for errors (ignoring warnings)
ignoreWarnings true
// Returns whether lint should check for fatal errors during release builds. Default is true.
// If issues with severity "fatal" are found, the release build is aborted.
checkReleaseBuilds false
}
}
在您应用的 build.gradle
中添加以下 lintOptions 块
lintOptions {
checkReleaseBuilds false
}
我在 Android studio v3.1.1.
中开发了一个 android 应用程序
我的项目已经完成,我想从 Build -> Generate Build Apk generate apk 但在第二次显示 Logcat
中的以下错误之后:
Lint found fatal errors while assembling a release target.
To proceed, either fix the issues identified by lint, or modify your build script as follows:
...
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
...
我该如何解决?请帮助我
你收到的消息告诉了你需要知道的一切。修复导致此消息的 lint 错误(查看文档 here 了解如何 运行 lint 以及在哪里可以找到包含详细信息的完整报告),或者将 checkReleaseBuilds false
添加到 lintOptions
块在你的 build.gradle 文件中。
在您应用的 build.gradle
中添加以下 lintOptions
块。
android {
defaultConfig {
...
}
buildTypes {
...
}
lintOptions {
// Returns whether lint should be quiet (for example, not write informational messages such as paths to report files written)
quiet true
// Whether lint should set the exit code of the process if errors are found
abortOnError false
// Returns whether lint will only check for errors (ignoring warnings)
ignoreWarnings true
// Returns whether lint should check for fatal errors during release builds. Default is true.
// If issues with severity "fatal" are found, the release build is aborted.
checkReleaseBuilds false
}
}
在您应用的 build.gradle
中添加以下 lintOptions 块 lintOptions {
checkReleaseBuilds false
}