Comments (7)
@KiWiLss 声明权限了吗
from floatwindow.
<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.
这是我下载下来直接运行的日志
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.
@KiWiLss 不好意思,在 style 下修改为 Theme.AppCompat 包下的主题可以暂时解决这个问题,我会尽快更新这个问题。
from floatwindow.
@KiWiLss 7.1及以上版本应该声名的悬浮窗权限是: < uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
from floatwindow.
@KiWiLss 已修复此bug
from floatwindow.
谢谢
from floatwindow.
Related Issues (20)
- 横屏靠右,切换横竖靠右 有问题 HOT 1
- androidP 9.0 悬浮权限无法申请
- 可以不申请权限使用吗
- 可以不申请权限吗 HOT 2
- 自定义布局存在把悬浮窗拖到边缘位置,里面有控件的情况下拖不动,因为里面的组件把事件拿走了
- FloatWindow of this tag has been added
- 被拖出去了,怎么办呀
- 设置自定义布局动画啊无效
- 当前Activity不在显示列表中,点击Home后如何显示?
- 悬浮窗中的edittext无法弹出输入法 HOT 1
- 应用打开权限页面时用户直接返回应用,再次调用代码块时出错
- setDesktopShow(false),返回后,闪一下就消失了 HOT 1
- 根布局view
- 点击事件怎么设置呢 HOT 4
- 进入APP不显示 ,然后我点击就显示,后台通知显示
- 不需要权限的悬浮窗方案了解一下~
- hasPermissionForO在8.0实际无效
- 我发现我的点击事件也不能设置emm
- 作者貌似弃坑了,推荐另外一款悬浮窗框架 HOT 1
- 重启app后不显示的问题,设置左面显示未true,不想要桌面显示的效果可以在ondestory销毁就可以了
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from floatwindow.