我已经在我的gradle中启用了pro guard并尝试生成已打开V1和V2签名的签名APK。然而问题是它没有给我100多行
duplicate definition of library class
can't find dynamically referenced class
can't find referenced class
等
我在下面添加了一些错误。
摇篮
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "io.example.mobile"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
dexOptions {
keepRuntimeAnnotatedClasses false
}
buildTypes {
release {
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/rxjava.properties'
}
错误
Note: duplicate definition of library class [okhttp3.Address]
Note: duplicate definition of library class [okhttp3.Authenticator$1]
Note: duplicate definition of library class [okhttp3.Authenticator]
Note: duplicate definition of library class [okio.AsyncTimeout$1]
Note: duplicate definition of library class [okio.AsyncTimeout$2]
Note: duplicate definition of library class [okio.AsyncTimeout$Watchdog]
Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl
Note: com.google.android.gms.internal.firebase_auth.zzbr: can't find dynamically referenced class libcore.io.Memory
Note: com.google.android.gms.internal.firebase_auth.zzbr: can't find dynamically referenced class org.robolectric.Robolectric
Note: com.google.android.gms.internal.firebase_auth.zzcn: can't find dynamically referenced class com.google.protobuf.ExtensionRegistry
Note: com.google.android.gms.internal.firebase_auth.zzco: can't find dynamically referenced class com.google.protobuf.Extension
Note: com.google.android.gms.internal.firebase_auth.zzcr: can't find dynamically referenced class com.google.protobuf.ExtensionSchemaFull
Note: com.google.android.gms.internal.firebase_auth.zzdw: can't find dynamically referenced class com.google.protobuf.DescriptorMessageInfoFactory
Note: com.google.android.gms.internal.firebase_auth.zzee: can't find dynamically referenced class com.google.protobuf.MapFieldSchemaFull
Note: the configuration keeps the entry point 'com.facebook.stetho.okhttp3.StethoInterceptor { okhttp3.Response intercept(okhttp3.Interceptor$Chain); }', but not the descriptor class 'okhttp3.Interceptor$Chain'
Note: the configuration keeps the entry point 'com.facebook.stetho.okhttp3.StethoInterceptor$ForwardingResponseBody { StethoInterceptor$ForwardingResponseBody(okhttp3.ResponseBody,java.io.InputStream); }', but not the descriptor class 'okhttp3.ResponseBody'
Note: the configuration keeps the entry point 'com.facebook.stetho.okhttp3.StethoInterceptor$OkHttpInspectorRequest { StethoInterceptor$OkHttpInspectorRequest(java.lang.String,okhttp3.Request,com.facebook.stetho.inspector.network.RequestBodyHelper); }', but not the descriptor class 'okhttp3.Request'