【问题标题】:Ionic 3: After updating to cordova-android 9 can not select files from driveIonic 3:更新到 cordova-android 9 后无法从驱动器中选择文件
【发布时间】:2023-03-29 23:23:01
【问题描述】:

我最近将 ionic 3 应用程序更新为支持 cordova-android 至 9,还更新了文件插件 (cordova-plugin-file),但我无法从 Google Drive 中选择文件或视频。

更新版本已开始出现选择文件错误。所有其他地方都可以工作,但对于 Google 驱动器,它会返回错误,除非所选文件是图像。

这里是错误日志:

3943-3975/? E/oiface: DynamicFps is not enabled!
1872-4430/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).

版本信息

    Ionic:
   Ionic CLI          : 5.2.4
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.4

Cordova:
   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 9.0.0, ios 5.1.1
   Cordova Plugins   : cordova-plugin-file 6.0.2, cordova-plugin-file-opener2 2.0.19, cordova-plugin-file-transfer 1.7.1, cordova-plugin-filechooser 1.2.0, cordova-plugin-filepath 1.5.8, cordova-plugin-filepicker 1.1.6,

Utility:
   cordova-res : 0.15.1 
   native-run  : not installed

System:
   Android SDK Tools : 26.1.1
   ios-sim           : 7.0.0
   NodeJS            : v10.16.2
   npm               : 6.9.0
   OS                : macOS Catalina
   Xcode             : Xcode 10.2 Build version 10E125

Android 工作室配置:

minSDKVersion: 19
targetSDKVersion: 29
android:requestLegacyExternalStorage="true"
<preference name="AndroidPersistentFileLocation" value="Compatibility" />

有人可以帮忙吗?

【问题讨论】:

    标签: android cordova ionic3 cordova-plugins cordova-plugin-file


    【解决方案1】:

    您还应该提及编译设置 android:compileSdkVersion="29" 以及 targetSDKVersionminSDKVersion,因为 Android 10 已更新存储访问设置。

    【讨论】:

      猜你喜欢
      • 2018-08-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-27
      • 1970-01-01
      • 1970-01-01
      • 2018-04-07
      • 2013-08-13
      相关资源
      最近更新 更多