sunflower
sunflower copied to clipboard
Didn't find class "android.view.View$OnUnhandledKeyEventListener"
Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, androidx.core.view.OnApplyWindowInsetsListener) (ViewCompat.java:2203) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at androidx.databinding.ViewDataBinding androidx.databinding.DataBindingUtil.setContentView(android.app.Activity, int, androidx.databinding.DataBindingComponent) (DataBindingUtil.java:303) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at androidx.databinding.ViewDataBinding androidx.databinding.DataBindingUtil.setContentView(android.app.Activity, int) (DataBindingUtil.java:284) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void com.google.samples.apps.sunflower.GardenActivity.onCreate(android.os.Bundle) (GardenActivity.kt:41) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6973) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1126) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2946) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3064) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.app.ActivityThread.-wrap14(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1659) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.os.Looper.loop() (Looper.java:154) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6823) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:1557) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1445) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.google.samples.apps.sunflower-1/base.apk"],nativeLibraryDirectories=[/data/app/com.google.samples.apps.sunflower-1/lib/arm, /system/lib, /vendor/lib]] 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, androidx.core.view.OnApplyWindowInsetsListener) (ViewCompat.java:2203) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at androidx.databinding.ViewDataBinding androidx.databinding.DataBindingUtil.setContentView(android.app.Activity, int, androidx.databinding.DataBindingComponent) (DataBindingUtil.java:303) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at androidx.databinding.ViewDataBinding androidx.databinding.DataBindingUtil.setContentView(android.app.Activity, int) (DataBindingUtil.java:284) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void com.google.samples.apps.sunflower.GardenActivity.onCreate(android.os.Bundle) (GardenActivity.kt:41) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6973) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1126) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2946) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3064) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.app.ActivityThread.-wrap14(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1659) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.os.Looper.loop() (Looper.java:154) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6823) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:1557) 2019-01-01 14:55:15.987 29675-29675/com.google.samples.apps.sunflower I/art: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1445) 201
Harmless
@hemantuno can you add more details on this error - what actions you performed when it happened, version of Android Studio, etc?
Run code on Samsung(Galaxy Tab A(2017) ) device using android studio 3.2.1. Very first time run app then above logs display.
Does Sunflower work when you run it on an emulator?
Not try in emulator.
Please try it in an emulator as to see if the error also happens there or only on the device.
Same error in emulator.
I'm unable to reproduce this. Can you try Android Studio 3.3 and in a new emulator? Also try doing a "File -> Invalidate caches / Restart" in Android Studio.
I'm seeing this stack trace in my app. I'm using Android Studio 3.3, invalidated cache, running on an emulator.
It's triggered after calling DataBindingUtil.setContentView(this, R.layout.activity)
:
Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener;
at void androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, androidx.core.view.OnApplyWindowInsetsListener) (ViewCompat.java:2420)
at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637)
at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518)
at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466)
at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:141)
at androidx.databinding.ViewDataBinding androidx.databinding.DataBindingUtil.setContentView(android.app.Activity, int, androidx.databinding.DataBindingComponent) (DataBindingUtil.java:303)
at androidx.databinding.ViewDataBinding androidx.databinding.DataBindingUtil.setContentView(android.app.Activity, int) (DataBindingUtil.java:284)
Same stacktrace. Android Studio 3.3. Invalidated cache. Running on device. Device fails to execute anything else on the Activity.
Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener;
at void androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, androidx.core.view.OnApplyWindowInsetsListener) (ViewCompat.java:2203)
at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637)
at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518)
at void androidx.appcompat.app.AppCompatDelegateImpl.onPostCreate(android.os.Bundle) (AppCompatDelegateImpl.java:299)
at void androidx.appcompat.app.AppCompatActivity.onPostCreate(android.os.Bundle) (AppCompatActivity.java:98)
at void android.app.Instrumentation.callActivityOnPostCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1285)
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2760)
Hi everyone - thanks for the error reports.
To help pinpoint the problem, please comment with the device you're using (even if it's an emulator), along with the OS version the device is running.
More info here: https://issuetracker.google.com/issues/120750246
Hello everyone, I also faced this issue. How can i resolve it?
Same problem for me... A workaround exists?
thx
Same for me...
Same problem here, any workaround?
Same for me... help me
Same problem here, is there a fix?
Same problem here, is there a fix? No
I also got this problem. Only thing I recently did was updating Android Studio to the latest version.
Got the same problem while rebuilding the same app on the same phone (one month ago it was working fine)
Whats the name of the class that is inaccesible?
b.h.i.u$b extended by class androidx.core.view.ViewCompat$5 is inaccessible
edit: Checking out the ViewCompat class file, at #2429:
v.setOnApplyWindowInsetsListener(new View.OnApplyWindowInsetsListener() {
@Override
public WindowInsets onApplyWindowInsets(View view, WindowInsets insets) {
WindowInsetsCompat compatInsets = WindowInsetsCompat.wrap(insets);
compatInsets = listener.onApplyWindowInsets(view, compatInsets);
return (WindowInsets) WindowInsetsCompat.unwrap(compatInsets);
}
});
Is something related to the 'insets' object that enforces us to use window insets in apps with android version <= Q ???
have we got any lead on this problem guys?
have we got any lead on this problem guys? no
same problem for me, yesterday it was working and today it is showing this error. Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.example.examandresultlatestgovtjobs-1/base.apk", zip file "/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.examandresultlatestgovtjobs-1/split_lib_slice_7_apk.apk", zi
I believe this error occurred after I change the app name in string.xml file.
I have i my project gradle : implementation "androidx.core:core-ktx:+"
-- Only this
then by reference of this https://stackoverflow.com/questions/53229259/no-super-method-getlifecycle-after-migrating-to-androidx I solved it.
My Solution : change in gradle file,
implementation "androidx.core:core:1.0.2" implementation "androidx.core:core-ktx:1.0.2"
Harmless
You mean intrusive, ugly, and log polluting?
I have the same issue. After looking around, looks like this is a known bug in ViewCompat that's unlikely to be fixed. I found more information at https://stackoverflow.com/a/52954286/759719. If this is indeed a benign issue, the exception should be caught and logged at debug or trace level, rather than info level. This has a productivity impact on apps with clean logs, where a stack trace triggers alarm notifications. Unfortunately this is likely handled by a different Google team.
This error often occurs when you enable multidex support for your apps. You may read more about it here