Android 警告:okhttp3.internal.platform.ConscryptPlatform:can';找不到引用的类org.conscrypt.OpenSSLProvider
我无法生成带有签名的APK,但可以运行应用程序并生成APK版本 所有办事处都已设立 我一直在寻找解决办法,结果却找不到 请帮帮你们 如果你想的话,我会发送更多的细节Android 警告:okhttp3.internal.platform.ConscryptPlatform:can';找不到引用的类org.conscrypt.OpenSSLProvider,android,android-studio,gradle,Android,Android Studio,Gradle,我无法生成带有签名的APK,但可以运行应用程序并生成APK版本 所有办事处都已设立 我一直在寻找解决办法,结果却找不到 请帮帮你们 如果你想的话,我会发送更多的细节 Warning:okhttp3.internal.platform.ConscryptPlatform: can't find referenced class org.conscrypt.OpenSSLProvider Warning:okhttp3.internal.platform.ConscryptPlatform: can
Warning:okhttp3.internal.platform.ConscryptPlatform: can't find referenced class org.conscrypt.OpenSSLProvider
Warning:okhttp3.internal.platform.ConscryptPlatform: can't find referenced class org.conscrypt.Conscrypt
Warning:there were 11 unresolved references to classes or interfaces.
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
Error:java.lang.RuntimeException: Job failed, see logs for details
Error:java.io.IOException: Please correct the above warnings first.
build.gradle
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
ext {
supportLibVersion = '27.1.1'
firebaseLipVersion = '15.0.0'
playServiceVersion = '15.0.0'
}
android {
signingConfigs {
config {
}
}
compileSdkVersion 27
defaultConfig {
applicationId "com.myappk.english"
minSdkVersion 15
targetSdkVersion 27
versionCode 4
versionName "Version 4"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation('com.crashlytics.sdk.android:crashlytics:2.9.2@aar') {
transitive = true
}
implementation files('libs/YouTubeAndroidPlayerApi.jar')
//noinspection GradleCompatible
implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation "com.android.support:design:$supportLibVersion"
implementation "com.android.support:support-v4:$supportLibVersion"
implementation "com.android.support:recyclerview-v7:$supportLibVersion"
implementation "com.android.support:support-emoji:$supportLibVersion"
implementation "com.android.support:support-emoji-appcompat:$supportLibVersion"
implementation "com.android.support:support-emoji-bundled:$supportLibVersion"
implementation "com.android.support:support-annotations:$supportLibVersion"
//noinspection GradleCompatible
implementation "com.google.firebase:firebase-messaging:15.0.2"
implementation "com.google.firebase:firebase-core:15.0.2"
implementation "com.google.firebase:firebase-crash:15.0.2"
implementation "com.google.firebase:firebase-ads:15.0.1"
implementation "com.google.firebase:firebase-invites:15.0.1"
implementation "com.google.firebase:firebase-auth:15.1.0"
implementation "com.google.firebase:firebase-appindexing:15.0.1"
implementation "com.google.android.gms:play-services-ads:15.0.1"
implementation "com.google.android.gms:play-services-analytics:15.0.2"
implementation "com.google.android.gms:play-services-auth:15.0.1"
implementation "com.google.android.gms:play-services-drive:15.0.1"
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.android.billingclient:billing:1.0'
implementation 'com.intuit.sdp:sdp-android:1.0.3'
implementation 'org.jetbrains:annotations-java5:15.0'
implementation 'com.github.medyo:android-about-page:1.2.4'
implementation 'com.squareup.picasso:picasso:2.71828'
testImplementation 'com.squareup.okhttp3:mockwebserver:3.10.0'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
谁有办法解决这个问题
做了这么多令人筋疲力尽的工作后,我感到很沮丧问题是通过改变来解决的 从 到
感谢您提供建议并展示一些需要翻译或添加的字符串货币(ranslatable=“false”),事实上,感谢hear的帮助,我们完成了一项像魔术一样的工作。Android Studio版本3.1.0和Gradle版本4.4存在问题 在
proguard rules.pro
文件中添加以下行以解决此问题
-dontwarn okhttp3.internal.platform.*
使用此代码
-dontwarn okhttp3.internal.platform*
已签名的apk构建但在移动设备上不幸停止消息出现,并且应用程序已关闭,但尚未获得此错误的解决方案
unsign应用程序运行良好,项目成功运行,但已签名的apk出现问题 使用这个。参考:
您的版本似乎已启用proguard(
minifyEnabled true
)。禁用它或确保正确设置谢谢你的建议,并显示了一些需要翻译或添加的字符串货币(ranslatable=“false”),事实上,像魔术一样的工作是由心来完成的。尽管这可能会解决问题,但这只是一种变通方法,不应该使用。如果我需要启用缩小功能怎么办?
minifyEnabled false
-dontwarn okhttp3.internal.platform.*
# JSR 305 annotations are for embedding nullability information.
-dontwarn javax.annotation.**
# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
-dontwarn org.codehaus.mojo.animal_sniffer.*
# OkHttp platform used only on JVM and when Conscrypt dependency is available.
-dontwarn okhttp3.internal.platform.ConscryptPlatform