生成带签名的APK时发生java错误
所以,每次我试图生成一个签名的apk时,这个错误就会出现,它不会让我完成生成签名的apk:
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: ... 安卓 {
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
} }
以下是应用程序gradle
apply plugin: 'com.安卓.application'
安卓 {
compileSdkVersion 26
defaultConfig {
applicationId "com.gmail.andre00nogueira.feelproject"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "安卓.support.test.runner.AndroidJUnitRunner"
renderscriptTargetApi 24
renderscriptSupportModeEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-安卓.txt'), 'proguard-rules.pro'
}
} }
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.安卓.support:appcompat-v7:26.1.0'
implementation 'com.安卓.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
安卓TestImplementation 'com.安卓.support.test:runner:1.0.1'
安卓TestImplementation 'com.安卓.support.test.espresso:espresso-core:3.0.1'
compile 'com.squareup.okhttp:okhttp:2.3.0'
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.安卓.support.constraint:constraint-layout:1.0.2'
compile 'com.wonderkiln:blurkit:1.0.0'
compile 'com.安卓.support:design:26.1.0'
compile 'com.google.firebase:firebase-core:12.0.0'
} apply plugin: 'com.google.gms.google-services'
下面是gradle项目
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.安卓.tools.build:gradle:3.1.0'
classpath 'com.google.gms:google-services:3.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
} }
allprojects {
repositories {
google()
jcenter()
} }
task clean(type: Delete) {
delete rootProject.buildDir }
# 1 楼答案
在android{}内的应用程序gradle中试试这个
# 2 楼答案
这通常与生成签名APK的方法相同,如果使用其他方法生成签名APK,则可以生成签名APK。 希望有帮助,祝你好运