Comments (3)
--------- beginning of crash 2019-09-17 21:17:28.465 657-657/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.android.systemui, PID: 657 java.lang.IllegalArgumentException: width and height must be > 0 at android.graphics.Bitmap.createBitmap(Bitmap.java:1001) at android.graphics.Bitmap.createBitmap(Bitmap.java:968) at android.graphics.Bitmap.createBitmap(Bitmap.java:918) at android.graphics.Bitmap.createBitmap(Bitmap.java:879) at android.graphics.drawable.AdaptiveIconDrawable.updateMaskBoundsInternal(AdaptiveIconDrawable.java:333) at android.graphics.drawable.AdaptiveIconDrawable.updateLayerBounds(AdaptiveIconDrawable.java:295) at android.graphics.drawable.AdaptiveIconDrawable.onStateChange(AdaptiveIconDrawable.java:782) at android.graphics.drawable.Drawable.setState(Drawable.java:775) at android.widget.ImageView.drawableStateChanged(ImageView.java:1305) at android.view.View.refreshDrawableState(View.java:20012) at android.view.View.dispatchAttachedToWindow(View.java:17409) at android.view.ViewGroup.addViewInner(ViewGroup.java:4955) at android.view.ViewGroup.addView(ViewGroup.java:4746) at com.android.systemui.statusbar.phone.NotificationIconAreaController.updateIconsForLayout(NotificationIconAreaController.java:247) at com.android.systemui.statusbar.phone.NotificationIconAreaController.updateNotificationIcons(NotificationIconAreaController.java:155) at com.android.systemui.statusbar.phone.StatusBar.updateNotificationShade(StatusBar.java:1958) at com.android.systemui.statusbar.phone.StatusBar.updateNotifications(StatusBar.java:2138) at com.android.systemui.statusbar.phone.StatusBar.addNotificationViews(StatusBar.java:6688) at com.android.systemui.statusbar.phone.StatusBar.addEntry(StatusBar.java:1629) at com.android.systemui.statusbar.phone.StatusBar.onAsyncInflationFinished(StatusBar.java:1646) at com.android.systemui.statusbar.notification.NotificationInflater$AsyncInflationTask.onAsyncInflationFinished(NotificationInflater.java:641) at com.android.systemui.statusbar.notification.NotificationInflater.finishIfDone(NotificationInflater.java:460) at com.android.systemui.statusbar.notification.NotificationInflater.-wrap0(Unknown Source:0) at com.android.systemui.statusbar.notification.NotificationInflater$6.onViewApplied(NotificationInflater.java:343) at android.widget.RemoteViews$AsyncApplyTask.onPostExecute(RemoteViews.java:3421) at android.widget.RemoteViews$AsyncApplyTask.onPostExecute(RemoteViews.java:3401) at android.os.AsyncTask.finish(AsyncTask.java:695) at android.os.AsyncTask.-wrap1(Unknown Source:0) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6541) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 2019-09-17 21:17:28.467 367-378/? W/RescueParty: Failed to determine if device was on USB java.io.FileNotFoundException: /sys/class/android_usb/android0/state (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:200) at java.io.FileInputStream.<init>(FileInputStream.java:150) at android.os.FileUtils.readTextFile(FileUtils.java:262) at com.android.server.RescueParty.isUsbActive(RescueParty.java:340) at com.android.server.RescueParty.isDisabled(RescueParty.java:85) at com.android.server.RescueParty.notePersistentAppCrash(RescueParty.java:117) at com.android.server.am.AppErrors.crashApplicationInner(AppErrors.java:342) at com.android.server.am.AppErrors.crashApplication(AppErrors.java:321) at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:14326) at com.android.server.am.ActivityManagerService.handleApplicationCrash(ActivityManagerService.java:14308) at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:79) at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2992) at android.os.Binder.execTransact(Binder.java:674)
from easyfloat.
from easyfloat.
这确实是的奇怪的问题,关键问题在这一行:
java.lang.IllegalArgumentException: width and height must be > 0
并且发现,只在启动前台服务的时候崩溃。最后发现是由:前台通知的图标引起的。
通知图标使用的是应用默认图标:
.setSmallIcon(R.mipmap.ic_launcher)
但是在API 26,也就是Android 8.0的情况下,系统使用的是自适应图标:
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
并不是直接设置的图片资源,所以在获取图片信息的时候就直接挂掉了...
from easyfloat.
Related Issues (20)
- 错误: 程序包com.lzf.easyfloat.widget.activityfloat不存在
- This feature requires ASM6
- 内存泄露 HOT 1
- 多进程应用使用会出现 Only the original thread that created a view hierarchy can touch its views HOT 1
- 嵌套recyclerView并开启拖动,会导致recyclerView本身滑动失效 HOT 1
- 通过发通知方式通知另外一个Activity显示浮窗,设置的偏移量失效
- EasyFloat.with(activity)建议
- 你好,悬浮窗其中自带的申请浮窗权限,自动处理回调结果失效 HOT 1
- 建议添加图层优先级显示设置
- 横向模式下面、沉浸模式,吸附模式无法吸附到上方
- 拖拽结束后如何获取当前悬浮窗在屏幕上的坐标
- Android 14 调用hide出现问题
- 你好,作者,可以支持自定义回调接口吗,需要实时更新ui HOT 2
- 此项目作者长期未更新,由于项目需要fork了一份修改,如有需求可关注
- 请问有没考虑支持RN
- 可以绑定到fragment上面吗
- 通过 MediaProject 录制屏幕的时候不展示悬浮球应该怎么处理?或者说不把悬浮球录制进去
- 悬浮窗能做到初始状态传递一个自定义View和整个屏幕一样大吗?然后在自定义View中去点击变成小窗模式,再点击还原到全屏悬浮窗
- kotlin
- EasyFloat.dismiss(FLOAT_BUTTON, true) 后再调用 android.os.Process.killProcess(android.os.Process.myPid())
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 easyfloat.