question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ClassNotFoundException : OnUnhandledKeyEventListener

See original GitHub issue

07-10 11:37:34.541 11093-11093/? D/SoLoader: init finish: 4 SO sources prepared init exiting 07-10 11:37:34.543 11093-11109/? D/SoLoader: About to load: libsonarfb.so libsonarfb.so not found on /data/data/kale.myapplication/lib-main 07-10 11:37:34.544 11093-11109/? D/SoLoader: libsonarfb.so found on /data/app/kale.myapplication-TqQGT0z8JQjr-rowWoGGuQ==/lib/arm64 Not resolving dependencies for libsonarfb.so 07-10 11:37:34.547 11093-11109/? D/SoLoader: Loaded: libsonarfb.so About to load: libsonar.so libsonar.so not found on /data/data/kale.myapplication/lib-main libsonar.so found on /data/app/kale.myapplication-TqQGT0z8JQjr-rowWoGGuQ==/lib/arm64 Not resolving dependencies for libsonar.so 07-10 11:37:34.565 11093-11109/? D/SoLoader: Loaded: libsonar.so 07-10 11:37:34.570 11093-11093/? I/sonar: sonar: SonarClient::addPlugin Inspector 07-10 11:37:34.624 11093-11093/? I/zygote64: Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; at void android.support.v4.view.ViewCompat.setBackground(android.view.View, android.graphics.drawable.Drawable) (ViewCompat.java:2340) at void android.support.v7.widget.ActionBarContainer.<init>(android.content.Context, android.util.AttributeSet) (ActionBarContainer.java:62) at java.lang.Object java.lang.reflect.Constructor.newInstance0(java.lang.Object[]) (Constructor.java:-2) at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:334) at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:647) at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:790) 07-10 11:37:34.625 11093-11093/? I/zygote64: at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:730) at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:863) at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:824) at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:515) at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:423) at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:374) at android.view.ViewGroup android.support.v7.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:605) at void android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:516) at void android.support.v7.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:464) at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) at void kale.myapplication.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:38) at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7036) at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7027) at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1231) at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2864) at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2989) at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1688) at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106) at void android.os.Looper.loop() (Looper.java:164) at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6753) at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:482) at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:807) Caused by: java.lang.ClassNotFoundException: Didn’t find class “android.view.View$OnUnhandledKeyEventListener” on path: DexPathList[[zip file “/data/app/kale.myapplication-TqQGT0z8JQjr-rowWoGGuQ==/base.apk”],nativeLibraryDirectories=[/data/app/kale.myapplication-TqQGT0z8JQjr-rowWoGGuQ==/lib/arm64, /data/app/kale.myapplication-TqQGT0z8JQjr-rowWoGGuQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]] at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125) at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) at void android.support.v4.view.ViewCompat.setBackground(android.view.View, android.graphics.drawable.Drawable) (ViewCompat.java:2340) at void android.support.v7.widget.ActionBarContainer.<init>(android.content.Context, android.util.AttributeSet) (ActionBarContainer.java:62) at java.lang.Object java.lang.reflect.Constructor.newInstance0(java.lang.Object[]) (Constructor.java:-2) at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:334) at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:647) at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:790) at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:730) at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:863) at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:824) at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:515) at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:423) at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:374) at android.view.ViewGroup android.support.v7.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:605) at void android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:516) at void android.support.v7.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:464) at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) at void kale.myapplication.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:38) at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7036) at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7027) at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1231) at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2864) at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2989) at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1688) at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106) at void android.os.Looper.loop() (Looper.java:164) at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6753) at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:482) at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:807)

gradle:

compileSdkVersion 28

    defaultConfig {
        applicationId "kale.myapplication"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:21

github_iconTop GitHub Comments

68reactions
tianzhijiexiancommented, Jul 10, 2018

fixed by:

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == "com.android.support") {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion "26.+"
            }
        }
    }
}
18reactions
jaeyoungleeeecommented, Jan 31, 2019

fixed by:

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == "com.android.support") {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion "26.+"
            }
        }
    }
}

It works for me! Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

android.view.View$OnUnhandledKeyEventListener
View$OnUnhandledKeyEventListener is add in api28. If runtime device below 28, can't find the class, but run without fatal error.
Read more >
View.OnUnhandledKeyEventListener | Android Developers
OnUnhandledKeyEventListener. bookmark_border. Stay organized with collections Save and categorize content based on your preferences. Dismiss
Read more >
Java.lang.ClassNotFoundException: Didn't find ... - iTecNote
ClassNotFoundException : Didn't find class “android.view.View$OnUnhandledKeyEventListener. androidandroid-studiojava. I get some exceptions on my Android ...
Read more >
java.lang.ClassNotFoundException: Didn't find ... - CodeAntenna
NoClassDefFoundError : Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; 2020-04-22 14:51:13.645 16578-16578/com.example.myapplication11 ...
Read more >
Didn't find class "android.view.View ... - 博客园
ClassNotFoundException : Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found