我正在尝试使用 android studio 为我的项目构建一个签名的 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:
...
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
}
}
...
在 reports/lint-results-release-fatal.html
我有以下错误:From previous topic ,我尝试在gradle中添加以下代码:
configurations {
all {
exclude module: 'httpclient'
exclude module: 'commons-logging'
}
}
这有助于解决问题,但后来我在运行时遇到了另一个问题(运行应用程序时):java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/commons/logging/LogFactory;
在线上:TimeZoneRegistry registry = TimeZoneRegistryFactory.getInstance().createRegistry();
Grandle 文件如下所示:dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.google.android.material:material:1.2.0'
implementation 'com.google.firebase:firebase-analytics:17.5.0'
implementation 'com.google.firebase:firebase-core:17.5.0'
implementation 'com.google.firebase:firebase-auth:19.3.2'
implementation 'com.google.firebase:firebase-firestore:21.6.0'
implementation 'com.google.firebase:firebase-database:19.4.0'
implementation 'com.google.firebase:firebase-storage:19.2.0'
implementation 'com.google.firebase:firebase-messaging:20.2.4'
implementation 'com.firebaseui:firebase-ui-firestore:6.2.1'
implementation 'com.firebaseui:firebase-ui-auth:6.2.1'
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'com.github.pchmn:MaterialChipsInput:1.0.8'
implementation 'com.github.Plumillon:ChipView:1.2.0'
implementation 'com.hbb20:ccp:2.4.0'
implementation 'org.mnode.ical4j:ical4j:1.0.5'
implementation 'backport-util-concurrent:backport-util-concurrent:3.1'
implementation 'commons-codec:commons-codec:1.10'
implementation 'commons-lang:commons-lang:2.6'
implementation 'com.linkedin.android.tachyon:tachyon:1.0.2'
}
可能是什么问题?我真的更喜欢解决这个问题,而不是忽略它。
最佳答案
我遇到了同样的问题,并用这个 youtube 助手解决了它。
reference video link
lintOptions{
checkReleaseBuilds 错误
}
关于java - 构建签名APK时android studio中的gradle问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63693854/