1

Im developing an android app and when i start the main activity in a device or emulator, appears this error in logcat.

How can i fix this?

PD: Recently, i read the following link and it seems that, apart of being related, is not resolved in a short while. https://github.com/googlesamples/android-sunflower/issues/295

Stack trace of the crash:

I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.collection.ArraySet$1>: java.lang.IllegalAccessError: Class b.e.f extended by class androidx.collection.ArraySet$1 is inaccessible (declaration of 'androidx.collection.ArraySet$1' appears in /data/app/org.bitbucket.marlonlom.usgsevents-1/base.apk)
I/art:     at void androidx.appcompat.app.f.<clinit>() (:165)
I/art:     at androidx.appcompat.app.f androidx.appcompat.app.f.a(android.app.Activity, androidx.appcompat.app.e) (:221)
I/art:     at androidx.appcompat.app.f androidx.appcompat.app.d.j() (:543)
I/art:     at void androidx.appcompat.app.d.attachBaseContext(android.content.Context) (:98)
I/art:     at void android.app.Activity.attach(android.content.Context, android.app.ActivityThread, android.app.Instrumentation, android.os.IBinder, int, android.app.Application, android.content.Intent, android.content.pm.ActivityInfo, java.lang.CharSequence, android.app.Activity, java.lang.String, android.app.Activity$NonConfigurationInstances, android.content.res.Configuration, java.lang.String, com.android.internal.app.IVoiceInteractor, android.view.Window) (Activity.java:6656)
I/art:     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2654)
I/art:     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2781)
I/art:     at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
I/art:     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1508)
I/art:     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
I/art:     at void android.os.Looper.loop() (Looper.java:241)
I/art:     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6274)
I/art:     at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/art:     at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:886)
I/art:     at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:776)

Edit: It seems that the above log shows the trace using Information tags, this is the part when after the INFO, appear a FATAL EXCEPTION:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.bitbucket.marlonlom.usgsevents, PID: 3023
    java.lang.IllegalAccessError: Illegal class access: 'b.h.i.u' attempting to access 'androidx.core.view.ViewCompat$1' (declaration of 'b.h.i.u' appears in base.apk)
        at b.h.i.u.a(:2429)
        at androidx.appcompat.app.g.x(:750)
        at androidx.appcompat.app.g.y(:630)
        at androidx.appcompat.app.g.c(:529)
        at androidx.appcompat.app.d.setContentView(:161)
Marlon López
  • 460
  • 8
  • 21
  • 1
    That's not an error, it is an `Informational message. It has no effect on how your app functions. – ianhanniballake May 13 '19 at 02:04
  • 1
    @ianhanniballake Are you sure about this? its weird that some error trace in android ViewCompat class shows such an error using information tags :| – Marlon López May 14 '19 at 03:07
  • The `re-init` information is coming from `art` i.e., [Android Art](https://source.android.com/devices/tech/dalvik) and has nothing to do with your exception. Of course, your exception is obfuscated with ProGuard, so no one can help you with that until you deobfuscate it. – ianhanniballake May 14 '19 at 03:32
  • @ianhanniballake my .pro file contains just "dontwarn" for okio and retrofit... and, checking the ViewCompat class, theres a method related to the window insets variable.. is there any workaround for that? im using Android Nougat, Kotlin 1.3.31 and androidx.appcompat:appcompat version 1.1.0-alpha05 – Marlon López May 14 '19 at 03:47

0 Answers0