AlexLiuSheng / CheckVersionLib

版本检测升级(更新)库。an auto check version library(app update) on Android
https://github.com/AlexLiuSheng/CheckVersionLib
2.66k stars 483 forks source link

Android 12 报错,请添加Android 12支持 #354

Closed stevin1021 closed 1 year ago

stevin1021 commented 2 years ago

java.lang.IllegalArgumentException: com.msd.pro.wms.dev: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. at android.app.PendingIntent.checkFlags(PendingIntent.java:375) at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:458) at android.app.PendingIntent.getActivity(PendingIntent.java:444) at android.app.PendingIntent.getActivity(PendingIntent.java:408) at com.allenliu.versionchecklib.v2.ui.NotificationHelper$showDownloadCompleteNotifcation$1.invoke(NotificationHelper.kt:96) at com.allenliu.versionchecklib.v2.ui.NotificationHelper$showDownloadCompleteNotifcation$1.invoke(NotificationHelper.kt:27) at com.allenliu.versionchecklib.v2.builder.BuilderManager.doWhenNotNull(BuilderManager.kt:62) at com.allenliu.versionchecklib.v2.builder.BuilderManager.doWhenNotNull$default(BuilderManager.kt:59) at com.allenliu.versionchecklib.v2.ui.NotificationHelper.showDownloadCompleteNotifcation(NotificationHelper.kt:81) at com.allenliu.versionchecklib.v2.ui.VersionService$downloadListener$1$onCheckerDownloadSuccess$1.invoke(VersionService.kt:220) at com.allenliu.versionchecklib.v2.ui.VersionService$downloadListener$1$onCheckerDownloadSuccess$1.invoke(VersionService.kt:203) at com.allenliu.versionchecklib.v2.builder.BuilderManager.doWhenNotNull(BuilderManager.kt:62) at com.allenliu.versionchecklib.v2.builder.BuilderManager.doWhenNotNull$default(BuilderManager.kt:59) at com.allenliu.versionchecklib.v2.ui.VersionService$downloadListener$1.onCheckerDownloadSuccess(VersionService.kt:218) at com.allenliu.versionchecklib.v2.net.DownloadMangerV2$2$1.run(DownloadMangerV2.java:43) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7870) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

leocreater commented 2 years ago

+1

jikun2008 commented 2 years ago

可以用我现在这个库支持Android12 原作者那里fork过来了的

implementation 'com.github.jikun2008:CheckVersionLib:2.4.5'

liangzilixueha commented 1 year ago

可以用我现在这个库支持Android12 原作者那里fork过来了的

implementation 'com.github.jikun2008:CheckVersionLib:2.4.5'

谢谢你,陌生人,我苦思冥想的问题竟然在原仓库的issues看到了解决方案,感动中国/大哭/大哭/大哭

mountainsC commented 1 year ago

可以用我现在这个库支持Android12 原作者那里fork过来了的

implementation 'com.github.jikun2008:CheckVersionLib:2.4.5'

Android 11 更新提示“下载安装包需要读写文件权限”

AlexLiuSheng commented 1 year ago

2.4.2 去除读写权限适配到android13