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.

crash on Android 7.1.1

See original GitHub issue

Hello, I just checked out “master”, imported in Android Studio and ran (otherwise untouched) on an Android 7.1.1 device. it crashes on me with

2020-10-28 10:38:24.687 5315-5315/? W/System: ClassLoader referenced unknown path: /data/app/com.commonsware.cwac.preso.demo.service-1/lib/arm64
2020-10-28 10:38:24.726 5315-5315/? W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
2020-10-28 10:38:24.753 5315-5315/? V/BoostFramework: mAcquireFunc method = public int com.qualcomm.qti.Performance.perfLockAcquire(int,int[])
2020-10-28 10:38:24.753 5315-5315/? V/BoostFramework: mReleaseFunc method = public int com.qualcomm.qti.Performance.perfLockRelease()
2020-10-28 10:38:24.753 5315-5315/? V/BoostFramework: mAcquireTouchFunc method = public int com.qualcomm.qti.Performance.perfLockAcquireTouch(android.view.MotionEvent,android.util.DisplayMetrics,int,int[])
2020-10-28 10:38:24.753 5315-5315/? V/BoostFramework: mIOPStart method = public int com.qualcomm.qti.Performance.perfIOPrefetchStart(int,java.lang.String)
2020-10-28 10:38:24.753 5315-5315/? V/BoostFramework: mIOPStop method = public int com.qualcomm.qti.Performance.perfIOPrefetchStop()
2020-10-28 10:38:24.756 5315-5315/? V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@d805c71
2020-10-28 10:38:24.756 5315-5315/? V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@c37fa56
2020-10-28 10:38:24.764 5315-5315/? I/art: 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;
2020-10-28 10:38:24.764 5315-5315/? I/art:     at void androidx.core.view.ViewCompat.setBackground(android.view.View, android.graphics.drawable.Drawable) (ViewCompat.java:2341)
2020-10-28 10:38:24.764 5315-5315/? I/art:     at void androidx.appcompat.widget.ActionBarContainer.<init>(android.content.Context, android.util.AttributeSet) (ActionBarContainer.java:62)
2020-10-28 10:38:24.764 5315-5315/? I/art:     at java.lang.Object java.lang.reflect.Constructor.newInstance0!(java.lang.Object[]) (Constructor.java:-2)
2020-10-28 10:38:24.764 5315-5315/? I/art:     at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430)
2020-10-28 10:38:24.764 5315-5315/? I/art:     at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:645)
2020-10-28 10:38:24.764 5315-5315/? I/art:     at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:787)
2020-10-28 10:38:24.764 5315-5315/? I/art:     at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:727)
2020-10-28 10:38:24.764 5315-5315/? I/art:     at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:858)
2020-10-28 10:38:24.764 5315-5315/? I/art:     at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:821)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:518)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:426)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:377)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:607)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void com.commonsware.cwac.preso.demo.service.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:28)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6720)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1119)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2618)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2726)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1477)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.os.Looper.loop() (Looper.java:154)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6119)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:886)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:776)
2020-10-28 10:38:24.765 5315-5315/? I/art: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.commonsware.cwac.preso.demo.service-1/base.apk"],nativeLibraryDirectories=[/data/app/com.commonsware.cwac.preso.demo.service-1/lib/arm64, /system/lib64, /vendor/lib64]]
2020-10-28 10:38:24.765 5315-5315/? I/art:     at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void androidx.core.view.ViewCompat.setBackground(android.view.View, android.graphics.drawable.Drawable) (ViewCompat.java:2341)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void androidx.appcompat.widget.ActionBarContainer.<init>(android.content.Context, android.util.AttributeSet) (ActionBarContainer.java:62)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at java.lang.Object java.lang.reflect.Constructor.newInstance0!(java.lang.Object[]) (Constructor.java:-2)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:645)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:787)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:727)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:858)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:821)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:518)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:426)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:377)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:607)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void com.commonsware.cwac.preso.demo.service.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:28)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6720)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1119)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2618)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2726)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1477)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.os.Looper.loop() (Looper.java:154)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6119)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:886)
2020-10-28 10:38:24.765 5315-5315/? I/art:     at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:776)
2020-10-28 10:38:24.896 5315-5315/? D/AndroidRuntime: Shutting down VM
2020-10-28 10:38:24.910 5315-5315/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.commonsware.cwac.preso.demo.service, PID: 5315
    java.lang.RuntimeException: Unable to create service com.commonsware.cwac.preso.demo.service.SlideshowService: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@7d96dcf -- permission denied for window type 2003
        at android.app.ActivityThread.handleCreateService(ActivityThread.java:3201)
        at android.app.ActivityThread.-wrap5(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6119)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
     Caused by: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@7d96dcf -- permission denied for window type 2003
        at android.view.ViewRootImpl.setView(ViewRootImpl.java:706)
        at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:348)
        at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:94)
        at com.commonsware.cwac.preso.PresentationService.showPreso(PresentationService.java:104)
        at com.commonsware.cwac.preso.PresentationHelper.handleRoute(PresentationHelper.java:133)
        at com.commonsware.cwac.preso.PresentationHelper.onResume(PresentationHelper.java:70)
        at com.commonsware.cwac.preso.PresentationService.onCreate(PresentationService.java:79)
        at com.commonsware.cwac.preso.demo.service.SlideshowService.onCreate(SlideshowService.java:51)
        at android.app.ActivityThread.handleCreateService(ActivityThread.java:3191)
        at android.app.ActivityThread.-wrap5(ActivityThread.java) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:154) 
        at android.app.ActivityThread.main(ActivityThread.java:6119) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 

any idea hot to fix or better diagnose ?

Thanks Tom.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
commonsguycommented, Oct 28, 2020

ok so this is my “change request” 😉

Ah, OK, you are looking for a change to the demo. I can look to do that at some point.

I actually came here to learn how to make Presentations that survive activity changes (for minSdkVersion 17 and all up)

The best answer for that is to use android:configChanges to opt out of the destroy-and-recreate cycle for all possible configuration changes, then handle all of those directly in your code. This should allow your Presentation survive configuration changes, as the activity (and its Presentation) is not destroyed.

I’m not sure I want to do this like PresentationService

I would not recommend PresentationService for that scenario.

0reactions
teichercommented, Oct 28, 2020

unfortunately, I actually came here to learn how to make Presentations that survive activity changes (for minSdkVersion 17 and all up) and I’m not sure I want to do this like PresentationService now…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Application crash on android 7.1.1 tablet · Issue #441
Bugs: We are using Chime SDK version 0.15.4. When we try to connect video consultation, the app gets crashed. Only one user was...
Read more >
Photos app crash on Android 7.1.1 [37125356] - Visible to Public ...
Steps: 1) open photos app and select a few photos/videos. 2) tap on the share button, then choose 'add to shared album' and...
Read more >
Bosion Android 7.1.1 Chrome crashes when trying to log in to ...
Bosion Android 7.1.1 Chrome crashes when trying to log in to Gmail.There is no way to set any kind of Google account on...
Read more >
Empty Firemonkey app crashes on startup just on Android ...
Empty Firemonkey app crashes on startup just on Android 7.1, with error NullPointerException on String.contains(CharSequence).
Read more >
Android 7.1.1 version crash - Cocos Creator
Android 7.1.1 version crash ... Hi guys? I get this error in the version of Cocos 3.5.2 I'm using and the game can't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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