ionic android升级错误 exposed beyond app through Intent.getData()
16lz
2021-01-23
应用内自动升级,下载安装包后抛出异常,先贴个错误
Log:
android.os.FileUriExposedException: file:///storage/emulated/0/aiyou.apk exposed beyond app through Intent.getData()
问题分析:
1.版本不支持
修改platforms>android
中的AndroidManifest.xml
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="23" />
尽量保持android:targetSdkVersion版本在24以下
If you have an app that shares files with other apps using a Uri, you may have encountered this error on API 24+.
2.权限问题
同样修改AndroidManifest.xml
文件,添加
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
这个主要影响Android 8.x版本
本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。
更多相关文章
- 修改系统Android版本,版本号
- Android SDK版本更新
- 几个Android小错误解决方法
- react-native 升级版本号
- android版本与linux内核版本对应关系
- 【学习Android遇到的错误】关于Unable to instantiate activity
- 【android错误收集】android.view.InflateException
- android个人错误,持续更新