公众号 | 掘金 | CSDN | 简书 | 个人博客 |
---|---|---|---|---|
Cretin的开发之路 | 点我 | 点我 | 点我 | 点我 |
- 通用免费API:https://github.com/MZCretin/RollToolsApi
- 段子乐APP开放API:https://github.com/MZCretin/duanzile-open-api
-
Roll地盘
-
宝宝每日记录
-
我有小家
-
阿萍TXT
-
记事萍
App 内部更新 提供12种更新的样式 支持Android全系统版本 支持自定义UI 断点续传
公众号 | 掘金 | CSDN | 简书 | 个人博客 |
---|---|---|---|---|
Cretin的开发之路 | 点我 | 点我 | 点我 | 点我 |
Roll地盘
宝宝每日记录
我有小家
阿萍TXT
记事萍
现在遥控器无法控制立即更新
E/【AppUpdateUtils】: 文件下载出错,异常信息为:java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
请问断点续传要怎么配置呢?为啥关了wifi再打开还是从0开始下载的
请看看
以Model的方式 使用 必须setProdVersionCode这个属性吗 不适用不好使?
应用未安装,该文件包与同一名称的现有文件包存在冲突
可以适配到android Q吗?
外部代码使用定时任务进行check,如果定时检测的时间太短,或者用户操作慢,会导致DownDataAsyncTask多次调用,弹出两个对话框什么的
查看了源码,HttpUtils中的HttpURLConnection并没有根据GET或POST来设置。
// 设置运行输入
httpURLConnection.setDoInput(true);
// 设置运行输出
httpURLConnection.setDoOutput(true);
导致到服务器为POST,这里应该只有POST才设置为true
只能下了源码修改了。。。
小米8安卓10
下载完成后安装闪退,报错:
FATAL EXCEPTION: main
Process: com.xxx.xxx, PID: 17311
java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/com.xxx.xxx/apks/xxx_7.0.2.apk
at androidx.core.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:744)
at androidx.core.content.FileProvider.getUriForFile(FileProvider.java:418)
at com.cretin.www.cretinautoupdatelibrary.utils.AppUtils.installApkFile(AppUtils.java:42)
at com.cretin.www.cretinautoupdatelibrary.utils.AppUpdateUtils.downloadComplete(AppUpdateUtils.java:421)
貌似是fielprovider的什么错误,我技术太水不会解决,麻烦lz看下
Android 10出来了,看代码没有适配,作者准备什么时候适配下呢
强制更新,接口没有回调,导致不能结束应用
This line of code would force HttpURLConnection to use the POST method all the time.
Here is the reference https://developer.android.com/reference/java/net/HttpURLConnection#http-methods
用浏览器可以正常下载
SDK31以上, 创建PendingIntent时, flag必须设置,请参考最新的api文档
Caused by: java.lang.IllegalArgumentException: com.luke.endoscope: 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.
你好,感谢你的库~
我下载了最新的demo,在小米4和魅族MX6上进行了尝试,均出现了“解析包时出现问题”。
请问如何解决呢?
android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@4fe3219 is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:782)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:378)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:114)
at android.app.Dialog.show(Dialog.java:440)
at android.support.v7.app.AlertDialog$Builder.show(AlertDialog.java:958)
at com.cretin.www.cretinautoupdatelibrary.utils.CretinAutoUpdateUtils.showUpdateDialog(CretinAutoUpdateUtils.java:389)
at com.cretin.www.cretinautoupdatelibrary.utils.CretinAutoUpdateUtils.access$1200(CretinAutoUpdateUtils.java:57)
at com.cretin.www.cretinautoupdatelibrary.utils.CretinAutoUpdateUtils$DownDataAsyncTask.onPostExecute(CretinAutoUpdateUtils.java:296)
at com.cretin.www.cretinautoupdatelibrary.utils.CretinAutoUpdateUtils$DownDataAsyncTask.onPostExecute(CretinAutoUpdateUtils.java:191)
at android.os.AsyncTask.finish(AsyncTask.java:692)
at android.os.AsyncTask.-wrap1(AsyncTask.java)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:709)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6577)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
您好,如果一款设备就是没有sd卡呢,但是内存空间特别大岂不是没有办法更新app了
博主有没有适配android 10 文件权限呢?
在某些旧手机上下载安装是没问题的,但在现在我的测试机红米note7上出现了这个bug,权限这块肯定是开了的
我这个两个接口都可以通过浏览器和 Postman 访问,但是写到项目里用来做更新接口就报错:
http://dms.shopoint.cn/posapp/appinfo.json
这个接口报 405
http://api.myjson.com/bins/yxvg0
这个接口报404
但是用你的 http://www.cretinzp.com/system/versioninfo
又能正常访问。
请问有什么玄机吗?百思不解
我下载了库之后 用jsonhelper来解析类 就是解析不出来 但是换了个fastjson库 就解析出来了
{"Content":{"versionCode":"18","isForceUpdate":"1","preBaselineCode":"0","versionName":"2.1.1","downurl":"http://120.24.5.102/Webconfig/frj01_211_jiagu_sign.apk","hasAffectCodes":"11|12|13|14|15|16|17","updateLog":"1、修复bug 2、完善部分功能点 3、系统升级,强制更新","size":"10291218"},"Status":200,"Message":"","IbReturnContent":false}
服务器的数据是这样的
通过判断本地已存在的安装包的大小来与服务器的安装包大小来判断是否要重新下载这样好吗?会不会因为计算的大小有差异而下载有问题呀?
一直卡在0% 不动了。
D/BitmapFactory: decodeResource getCachedBitmap ok
D/BitmapFactory: decodeResource getCachedBitmap ok
D/BitmapFactory: decodeResource getCachedBitmap ok
E/【AppUpdateUtils】: 文件正在下载中,进度为0%
E/【AppUpdateUtils】: 文件正在下载中,进度为0%
E/【AppUpdateUtils】: 文件正在下载中,进度为0%
I/chatty: uid=10266(com.cretin.www.autoupdateproject) identical 1 line
AutoUpdateProject: 2.0.4
compileSdkVersion: 28
minSdkVersion 19
模拟器Android: 5.1.1
使用配置请求链接的方式,让插件自己解析并实现更新,用TypeConfig.METHOD_GET模式,apache日志显示,AutoUpdateProject依然以POST方式请求json文件。
看代码,HttpUtils.java中的doGet方法并没有调用setRequestMethod,会不会是被默认成POST了。
如题,如果更新途中网络中断,则闪退,再次打开也不能续传,要重新更新,不知道更新断开时下载一半的文件是否自己删除。Android8.0其他版本没有试
没有的话我来做一个,有的话就不造轮子了。
getInstance()方法中的广播注册有问题,每次调用getInstance()都会注册一个新广播,而在destory()中只unregister了一次,造成广播泄露。
getInstance(context).check() 时注册了一个广播 onDestory()中getInstance(context).destory() 中又注册了一个广播
是否应该在getInstance()中判断已经实例化过了就不应该再注册广播了。
android studio dolphin, can't build
Task :app:dataBindingMergeDependencyArtifactsDebug
AGPBI: {"kind":"warning","text":"Your project has set `android.useAndroidX=true`, but configuration `:app:debugRuntimeClasspath` still contains legacy support libraries, which may cause runtime issues.\nThis behavior will not be allowed in Android Gradle plugin 8.0.\nPlease use only AndroidX dependencies or set `android.enableJetifier=true` in the `gradle.properties` file to migrate your project to AndroidX (see https://developer.android.com/jetpack/androidx/migrate for more info).\nThe following legacy support libraries are detected:\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-annotations:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-compat:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:collections:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-compat:28.0.0 -> android.arch.lifecycle:runtime:1.1.1\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-compat:28.0.0 -> android.arch.lifecycle:runtime:1.1.1 -> android.arch.lifecycle:common:1.1.1\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-compat:28.0.0 -> android.arch.lifecycle:runtime:1.1.1 -> android.arch.core:common:1.1.1\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-compat:28.0.0 -> com.android.support:versionedparcelable:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:cursoradapter:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-core-utils:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-core-utils:28.0.0 -> com.android.support:documentfile:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:loader:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:loader:28.0.0 -> android.arch.lifecycle:livedata:1.1.1\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:loader:28.0.0 -> android.arch.lifecycle:livedata:1.1.1 -> android.arch.core:runtime:1.1.1\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:loader:28.0.0 -> android.arch.lifecycle:livedata:1.1.1 -> android.arch.lifecycle:livedata-core:1.1.1\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> android.arch.lifecycle:viewmodel:1.1.1\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-core-utils:28.0.0 -> com.android.support:localbroadcastmanager:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-core-utils:28.0.0 -> com.android.support:print:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:customview:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:viewpager:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:coordinatorlayout:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:drawerlayout:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:slidingpanelayout:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:interpolator:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:swiperefreshlayout:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:asynclayoutinflater:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-vector-drawable:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:animated-vector-drawable:28.0.0\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support.constraint:constraint-layout:1.1.3\n:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support.constraint:constraint-layout:1.1.3 -> com.android.support.constraint:constraint-layout-solver:1.1.3","sources":[{}]}
Your project has set `android.useAndroidX=true`, but configuration `:app:debugRuntimeClasspath` still contains legacy support libraries, which may cause runtime issues.
This behavior will not be allowed in Android Gradle plugin 8.0.
Please use only AndroidX dependencies or set `android.enableJetifier=true` in the `gradle.properties` file to migrate your project to AndroidX (see https://developer.android.com/jetpack/androidx/migrate for more info).
The following legacy support libraries are detected:
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-annotations:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-compat:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:collections:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-compat:28.0.0 -> android.arch.lifecycle:runtime:1.1.1
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-compat:28.0.0 -> android.arch.lifecycle:runtime:1.1.1 -> android.arch.lifecycle:common:1.1.1
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-compat:28.0.0 -> android.arch.lifecycle:runtime:1.1.1 -> android.arch.core:common:1.1.1
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-compat:28.0.0 -> com.android.support:versionedparcelable:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:cursoradapter:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-core-utils:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-core-utils:28.0.0 -> com.android.support:documentfile:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:loader:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:loader:28.0.0 -> android.arch.lifecycle:livedata:1.1.1
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:loader:28.0.0 -> android.arch.lifecycle:livedata:1.1.1 -> android.arch.core:runtime:1.1.1
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:loader:28.0.0 -> android.arch.lifecycle:livedata:1.1.1 -> android.arch.lifecycle:livedata-core:1.1.1
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> android.arch.lifecycle:viewmodel:1.1.1
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-core-utils:28.0.0 -> com.android.support:localbroadcastmanager:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-core-utils:28.0.0 -> com.android.support:print:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:customview:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:viewpager:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:coordinatorlayout:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:drawerlayout:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:slidingpanelayout:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:interpolator:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:swiperefreshlayout:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-fragment:28.0.0 -> com.android.support:support-core-ui:28.0.0 -> com.android.support:asynclayoutinflater:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:support-vector-drawable:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support:appcompat-v7:28.0.0 -> com.android.support:animated-vector-drawable:28.0.0
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support.constraint:constraint-layout:1.1.3
:app:debugRuntimeClasspath -> com.github.MZCretin:AutoUpdateProject:2.0.5 -> com.android.support.constraint:constraint-layout:1.1.3 -> com.android.support.constraint:constraint-layout-solver:1.1.3
> Task :app:dataBindingMergeDependencyArtifactsDebug UP-TO-DATE
第一次:
01-06 10:43:54.222 9068-9068/com.example.android.cy_android V/AudioManager: playSoundEffect effectType: 0
01-06 10:43:54.253 9068-9068/com.example.android.cy_android W/System.err: java.lang.NumberFormatException: For input string: "null"
01-06 10:43:54.259 9068-9068/com.example.android.cy_android W/System.err: at java.lang.Long.parseLong(Long.java:590)
01-06 10:43:54.260 9068-9068/com.example.android.cy_android W/System.err: at java.lang.Long.parseLong(Long.java:632)
01-06 10:43:54.261 9068-9068/com.example.android.cy_android W/System.err: at com.cretin.www.cretinautoupdatelibrary.utils.CretinAutoUpdateUtils.requestPermission(CretinAutoUpdateUtils.java:649)
01-06 10:43:54.262 9068-9068/com.example.android.cy_android W/System.err: at com.cretin.www.cretinautoupdatelibrary.utils.CretinAutoUpdateUtils.startUpdate(CretinAutoUpdateUtils.java:741)
01-06 10:43:54.263 9068-9068/com.example.android.cy_android W/System.err: at com.cretin.www.cretinautoupdatelibrary.utils.CretinAutoUpdateUtils$7.onClick(CretinAutoUpdateUtils.java:579)
01-06 10:43:54.264 9068-9068/com.example.android.cy_android W/System.err: at android.view.View.performClick(View.java:6291)
01-06 10:43:54.265 9068-9068/com.example.android.cy_android W/System.err: at android.view.View$PerformClick.run(View.java:24931)
01-06 10:43:54.266 9068-9068/com.example.android.cy_android W/System.err: at android.os.Handler.handleCallback(Handler.java:808)
01-06 10:43:54.267 9068-9068/com.example.android.cy_android W/System.err: at android.os.Handler.dispatchMessage(Handler.java:101)
01-06 10:43:54.268 9068-9068/com.example.android.cy_android W/System.err: at android.os.Looper.loop(Looper.java:166)
01-06 10:43:54.269 9068-9068/com.example.android.cy_android W/System.err: at android.app.ActivityThread.main(ActivityThread.java:7396)
01-06 10:43:54.271 9068-9068/com.example.android.cy_android W/System.err: at java.lang.reflect.Method.invoke(Native Method)
01-06 10:43:54.272 9068-9068/com.example.android.cy_android W/System.err: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
01-06 10:43:54.273 9068-9068/com.example.android.cy_android W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:926)
01-06 10:43:54.292 9068-9146/com.example.android.cy_android W/libEGL: EGLNativeWindowType 0xb7c62008 disconnect failed
我以为是我数据的size返回的是null的原因,但是后来加上后Log:
01-06 11:14:07.722 30850-30850/com.example.android.cy_android I/hwaps: JNI_OnLoad
01-06 11:14:07.815 30850-30850/com.example.android.cy_android V/AudioManager: playSoundEffect effectType: 0
01-06 11:14:07.856 30850-30909/com.example.android.cy_android W/libEGL: EGLNativeWindowType 0xc2918808 disconnect failed
01-06 11:14:07.905 30850-30850/com.example.android.cy_android E/NotificationManager: notifyAsUser: tag=null, id=0, user=UserHandle{0}
01-06 11:14:08.413 30850-30850/com.example.android.cy_android E/NotificationManager: notifyAsUser: tag=null, id=0, user=UserHandle{0}
01-06 11:14:08.488 30850-30850/com.example.android.cy_android E/NotificationManager: notifyAsUser: tag=null, id=0, user=UserHandle{0}
01-06 11:14:08.604 30850-30861/com.example.android.cy_android I/zygote: Background concurrent copying GC freed 4404(494KB) AllocSpace objects, 0(0B) LOS objects, 50% free, 5MB/11MB, paused 508us total 112.148ms
01-06 11:14:08.931 30850-30850/com.example.android.cy_android E/NotificationManager: notifyAsUser: tag=null, id=0, user=UserHandle{0}
01-06 11:14:09.262 30850-30850/com.example.android.cy_android E/NotificationManager: notifyAsUser: tag=null, id=0, user=UserHandle{0}
01-06 11:14:09.387 30850-30850/com.example.android.cy_android E/NotificationManager: notifyAsUser: tag=null, id=0, user=UserHandle{0}
01-06 11:14:10.434 30850-30850/com.example.android.cy_android E/NotificationManager: notifyAsUser: tag=null, id=0, user=UserHandle{0}
01-06 11:14:10.894 30850-30850/com.example.android.cy_android E/NotificationManager: notifyAsUser: tag=null, id=0, user=UserHandle{0}
01-06 11:14:11.207 30850-30850/com.example.android.cy_android E/NotificationManager: notifyAsUser: tag=null, id=0, user=UserHandle{0}
01-06 11:14:11.508 30850-30850/com.example.android.cy_android E/NotificationManager: notifyAsUser: tag=null, id=0, user=UserHandle{0}
01-06 11:14:11.773 30850-30850/com.example.android.cy_android E/NotificationManager: notifyAsUser: tag=null, id=0, user=UserHandle{0}
01-06 11:14:12.001 30850-30850/com.example.android.cy_android E/NotificationManager: notifyAsUser: tag=null, id=0, user=UserHandle{0}
01-06 11:14:12.229 30850-30850/com.example.android.cy_android E/NotificationManager: notifyAsUser: tag=null, id=0, user=UserHandle{0}
请问下是什么问题了??
2022-10-17 16:21:59.369 17766-17766/com.qs.shabaojs E/【AppUpdateUtils】: 文件下载完成,准备安装,文件地址:/storage/emulated/0/Android/data/com.zbc.abb/cache/com.zbc.abb/apks/新版本_1.0.9.apk
2022-10-17 16:21:59.371 17766-17766/com.qs.shabaojs E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.qs.shabaojs, PID: 17766
java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/Android/data/com.zbc.abb/cache/com.zbc.abb/apks/新版本_1.0.9.apk
at androidx.core.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:744)
at androidx.core.content.FileProvider.getUriForFile(FileProvider.java:418)
at com.cretin.www.cretinautoupdatelibrary.utils.AppUtils.installApkFile(AppUtils.java:42)
at com.cretin.www.cretinautoupdatelibrary.utils.AppUpdateUtils.downloadComplete(AppUpdateUtils.java:421)
at com.cretin.www.cretinautoupdatelibrary.utils.AppUpdateUtils.access$400(AppUpdateUtils.java:53)
at com.cretin.www.cretinautoupdatelibrary.utils.AppUpdateUtils$1.completed(AppUpdateUtils.java:352)
at com.liulishuo.filedownloader.FileDownloadMessenger.handoverMessage(FileDownloadMessenger.java:344)
at com.liulishuo.filedownloader.FileDownloadMessageStation$UIHandlerCallback.dispose(FileDownloadMessageStation.java:185)
at com.liulishuo.filedownloader.FileDownloadMessageStation$UIHandlerCallback.handleMessage(FileDownloadMessageStation.java:173)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:225)
at android.app.ActivityThread.main(ActivityThread.java:7563)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:994)
作者你好,相同版本的apk只会下载一次,防止重复下载!但实际情况是每次都会重新下载。也没找到设置的地方。还有能加自定义保存路径吗?谢谢作者
setBaseUrl("http://101.201.31.212:8016/version/checkVersion")
上面的方法只能传一个地址,没办法带上参数?
文件下载出错,异常信息为:Create parent directory failed, please make sure you have permission to create file or directory on the path: /storage/emulated/0/com.hs.beidou.quantitativ/apks
最新版v2.0.5下载完毕后,拉起安装时崩溃
崩溃信息
java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/Android/data/
楼主已经不维护这个项目了吗?Android 10以上的分区存储没有得到更新适配呢!
how to proguard?
主动避免 android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@4fe3219 is not valid; is your activity running? 这个问题
文件下载出错,异常信息为:java.io.IOException: Create parent folder failed!
楼主,有没有兴趣发布一个Cordova版本的,直接推到cordova仓库上
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.