简体   繁体   中英

While migrating to Android Api level 29, I am getting this error, requestLegacyExternalStorage not found, failed processing manifest

I have to use requestLegacyExternalStorage="true" for accessing external storage in my react native app,

build.gradle:
   buildToolsVersion = "29.0.0"
        minSdkVersion = 23
        compileSdkVersion = 29
        targetSdkVersion = 29
        supportLibVersion = "29.0.0"````
Manifest:
  <application
        tools:targetApi="29"
        tools:ignore="GoogleAppIndexingWarning"
        android:name=".MainApplication"
        android:allowBackup="false"
        android:theme="@style/AppTheme"
        android:requestLegacyExternalStorage="true"
        android:largeHeap="true">````
    
Error:
error: attribute android:requestLegacyExternalStorage not found.
error: failed processing manifest

我通过将子项目 compilesdkversion 更改为 29 解决了这个错误

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM