Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floating View crashes on Android O #1

Open
Xlythe opened this issue Aug 16, 2017 · 1 comment
Open

Floating View crashes on Android O #1

Xlythe opened this issue Aug 16, 2017 · 1 comment
Assignees
Labels

Comments

@Xlythe
Copy link
Owner

Xlythe commented Aug 16, 2017

08-16 09:18:14.943 15206 15206 E AndroidRuntime: FATAL EXCEPTION: main
08-16 09:18:14.943 15206 15206 E AndroidRuntime: Process: com.android2.calculator3, PID: 15206
08-16 09:18:14.943 15206 15206 E AndroidRuntime: java.lang.RuntimeException: Unable to create service com.xlythe.calculator.material.floating.FloatingCalculator: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@2c9cd54 -- permission denied for window type 2002
08-16 09:18:14.943 15206 15206 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:3414)
08-16 09:18:14.943 15206 15206 E AndroidRuntime: at android.app.ActivityThread.-wrap4(Unknown Source:0)
08-16 09:18:14.943 15206 15206 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1683)
08-16 09:18:14.943 15206 15206 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
08-16 09:18:14.943 15206 15206 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
08-16 09:18:14.943 15206 15206 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6541)
08-16 09:18:14.943 15206 15206 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
08-16 09:18:14.943 15206 15206 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
08-16 09:18:14.943 15206 15206 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
08-16 09:18:14.943 15206 15206 E AndroidRuntime: Caused by: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@2c9cd54 -- permission denied for window type 2002
08-16 09:18:14.943 15206 15206 E AndroidRuntime: at android.view.ViewRootImpl.setView(ViewRootImpl.java:789)
08-16 09:18:14.943 15206 15206 E AndroidRuntime: at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:356)
08-16 09:18:14.943 15206 15206 E AndroidRuntime: at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:92)
08-16 09:18:14.943 15206 15206 E AndroidRuntime: at com.xlythe.view.floating.FloatingView.onCreate(FloatingView.java:160)
08-16 09:18:14.943 15206 15206 E AndroidRuntime: at com.xlythe.calculator.material.floating.FloatingCalculator.onCreate(FloatingCalculator.java:55)
08-16 09:18:14.943 15206 15206 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:3404)
08-16 09:18:14.943 15206 15206 E AndroidRuntime: ... 8 more

@Xlythe Xlythe added the bug label Aug 16, 2017
@Xlythe Xlythe self-assigned this Aug 16, 2017
@lupsaa
Copy link

lupsaa commented Nov 22, 2017

This should fix it: https://stackoverflow.com/a/47103959/2154462

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants