Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装包下载到自定义的目录下无法触发安装 #11

Closed
StitchC opened this issue Jan 31, 2023 · 4 comments
Closed

安装包下载到自定义的目录下无法触发安装 #11

StitchC opened this issue Jan 31, 2023 · 4 comments

Comments

@StitchC
Copy link

StitchC commented Jan 31, 2023

你好我使用的插件进行apk 安装
我的apk 下载目录是 /data/user/0/${packageName}/app_flutter/update/erp_app_47895935d5b93b4f0728188f2d713ee80473d16c8c53a950839ab2301ce6c7f8.apk

然后调用 installApk api 后报了这样的错
image

看错误内容应该是要把安装包下载到 /data/data/${packageName}/ 这个目录下面才能触发安装吗?

@StitchC
Copy link
Author

StitchC commented Feb 1, 2023

这个问题已解决 我将安装包下载到 app 内部存储的目录里面就可以了,但是我发现在安卓4.x 的系统上,只要触发安装就会提示“无法解析安装包” 的错误,是什么原因呢?

@BytesZero
Copy link
Owner

没有遇到过这个问题

@BytesZero
Copy link
Owner

@StitchC
Copy link
Author

StitchC commented Feb 13, 2023

这个应该是和你的 FileProvider 相关,https://github.com/yy1300326388/app_installer/blob/master/example/android/app/src/main/res/xml/file_paths.xml

FileProvider 设置没问题的 其他安卓版本都尝试过可以 但是Android4.x 就一直提示解析程序包出错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants