Giter Site home page Giter Site logo

bug about floatwindow HOT 7 CLOSED

yhaolpz avatar yhaolpz commented on July 20, 2024
bug

from floatwindow.

Comments (7)

yhaolpz avatar yhaolpz commented on July 20, 2024

@KiWiLss 声明权限了吗

from floatwindow.

KiWiLss avatar KiWiLss commented on July 20, 2024
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
<!--验证快捷方式是否存在权限:-->
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
<!--删除快捷方式权限:-->
<uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT" />

这三个权限

from floatwindow.

KiWiLss avatar KiWiLss commented on July 20, 2024

这是我下载下来直接运行的日志
FATAL EXCEPTION: main
Process: com.example.yhao.fixedfloatwindow, PID: 4180
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.yhao.fixedfloatwindow/com.example.fixedfloatwindow.FixedFloatActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
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: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
at android.support.v7.app.AppCompatDelegateImplV9.createSubDecor(AppCompatDelegateImplV9.java:356)
at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:325)
at android.support.v7.app.AppCompatDelegateImplV9.onPostCreate(AppCompatDelegateImplV9.java:173)
at android.support.v7.app.AppCompatActivity.onPostCreate(AppCompatActivity.java:97)
at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1199)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2647)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) 
at android.app.ActivityThread.-wrap12(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:154)

from floatwindow.

yhaolpz avatar yhaolpz commented on July 20, 2024

@KiWiLss 不好意思,在 style 下修改为 Theme.AppCompat 包下的主题可以暂时解决这个问题,我会尽快更新这个问题。

from floatwindow.

yhaolpz avatar yhaolpz commented on July 20, 2024

@KiWiLss 7.1及以上版本应该声名的悬浮窗权限是: < uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

from floatwindow.

yhaolpz avatar yhaolpz commented on July 20, 2024

@KiWiLss 已修复此bug

from floatwindow.

KiWiLss avatar KiWiLss commented on July 20, 2024

谢谢

from floatwindow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.