-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Didn't find class "android.view.View$OnUnhandledKeyEventListener" #295
Comments
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. |
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. 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.
|
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, |
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? |
|
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?
edit: 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? |
|
same problem for me, yesterday it was working and today it is showing this error. |
I believe this error occurred after I change the app name in string.xml file. |
I have i my project gradle : My Solution : change in gradle file, |
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 |
this facebook/flipper#146 (comment) works for me |
Same problem with android Studio 3.4.1. After having upgraded to android studio 3.4.2, the problem disappeared :) |
after this warning appears the google material design style won't apply on MaterialCardView!! any suggestions how to fix it and why this happening? |
Can you please check whether you integrated the related library. I got the same error but found the below problem in my code. The following correction resolved my problem |
i also meet this bug |
I have same problem. Here is stack trace log.
|
i get this error when i run my app any one who is intersted ...please help me |
This worked for me! |
I had the same issue, my minSdkVersion was 21 . Changing it to 28(min required to use this API) in build.gradle fixed the issue. |
Ok.tanks.
…On Wed, Apr 22, 2020 at 9:04 PM Nawnit sen ***@***.***> wrote:
I had the same issue, my minSdkVersion was 21. Changing it to 28(min
required to use this API) fixed the issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#295 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALEVPONZDTEXY22VO2GIDPLRN645PANCNFSM4GMXJYIQ>
.
|
Some people want to support older devices. |
For me the version resolved this issue was 1.4.0-alpha01, not below 1.3.0. |
this post on stackoverflow seems promising: |
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
The text was updated successfully, but these errors were encountered: