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

点击打开悬浮窗直接崩溃,系统是5.1 #8

Open
ChloeDimen opened this issue Sep 10, 2020 · 0 comments
Open

点击打开悬浮窗直接崩溃,系统是5.1 #8

ChloeDimen opened this issue Sep 10, 2020 · 0 comments

Comments

@ChloeDimen
Copy link

01-21 18:33:05.663 4217-4217/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: xzr.perfmon, PID: 4217
java.lang.RuntimeException: Unable to create service xzr.perfmon.FloatingWindow: java.lang.NullPointerException: Attempt to invoke interface method 'float android.content.SharedPreferences.getFloat(java.lang.String, float)' on a null object reference
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2791)
at android.app.ActivityThread.access$1800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5280)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'float android.content.SharedPreferences.getFloat(java.lang.String, float)' on a null object reference
at xzr.perfmon.FloatingWindow.init(FloatingWindow.java:66)
at xzr.perfmon.FloatingWindow.onCreate(FloatingWindow.java:290)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2781)

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

No branches or pull requests

1 participant