Android版本更新問題:ionic+cordova打包后,android8.0及以上權限公開問題


問題:cordova打包項目后,在Android8.0及以上版本更新下載后,不能打開APP的問題?

 

原因:cordova官網提示 android 8.0 需要添加配置文件。

           Android APK安裝限制 打開APK文件進行安裝時,以下限制適用: 在Android 8+上,您的應用程序必須具有ACTION_INSTALL_PACKAGE權限。

 

解決方法:

在您的應用程序config.xml文件來添加它:

 <platform name="android">
        <config-file parent="/manifest" target="AndroidManifest.xml"        xmlns:android="http://schemas.android.com/apk/res/android">
            <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
        </config-file>
    </platform>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM