gpt4 book ai didi

android - Android Studio 3.2 升级上的 java.lang.VerifyError

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:01:01 27 4
gpt4 key购买 nike

我环顾四周并尝试清理我的构建文件夹,使缓存无效并重新启动,并设置 android.enableR8=false

但是当我构建一个发布 apk 并尝试运行该应用程序时,我仍然无法解决这个问题。

2018-09-26 23:07:19.428 19200-19200/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: sic.nzb.app, PID: 19200
java.lang.VerifyError: Verifier rejected class com.google.firebase.FirebaseApp: void com.google.firebase.FirebaseApp.<clinit>() failed to verify: void com.google.firebase.FirebaseApp.<clinit>(): [0x33] register v1 has type Uninitialized Reference: java.lang.Object Allocation PC: 49 but expected Reference: java.lang.Object
void com.google.firebase.FirebaseApp.<init>(android.content.Context, java.lang.String, com.google.firebase.FirebaseOptions) failed to verify: void com.google.firebase.FirebaseApp.<init>(android.content.Context, java.lang.String, com.google.firebase.FirebaseOptions): [0x4B] 'this' arg must be initialized (declaration of 'com.google.firebase.FirebaseApp' appears in base.apk)
at com.google.firebase.FirebaseApp.a(SourceFile:274)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(SourceFile:37)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1917)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1892)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(SourceFile:31)
at android.app.ActivityThread.installProvider(ActivityThread.java:6391)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853)
at android.app.ActivityThread.access$1100(ActivityThread.java:199)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

梯度依赖:

dependencies {
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.6'


implementation project(':oIFileManager')
implementation project(':FullScreenActivity')
implementation rootProject.ext.libraries.appcompatv7
implementation rootProject.ext.libraries.supportdesign
implementation 'org.jsoup:jsoup:1.11.3'
implementation project(path: ':unrar-native')
implementation 'com.google.guava:guava:23.0-android'

implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
implementation 'com.google.firebase:firebase-core:16.0.3'
implementation 'com.google.firebase:firebase-messaging:17.3.2'

testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation 'org.powermock:powermock-module-junit4:1.6.2'
testImplementation 'org.powermock:powermock-api-mockito:1.6.2'
testImplementation group: 'org.apache.commons', name: 'commons-io', version: '1.3.2'

implementation 'com.android.support.constraint:constraint-layout:1.1.3'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
}

最佳答案

通过更新 proguard-project.txt 解决

来自:

-assumenosideeffects class android.util.Log {
*;

收件人:

-assumenosideeffects class android.util.Log {
public static *** v(...);
public static *** d(...);
public static *** i(...);
public static *** w(...);
public static *** e(...);
}

关于android - Android Studio 3.2 升级上的 java.lang.VerifyError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52528943/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com