Why is "error:attribute android:preserveLegacyExternalStorage not found." displayed?
Last Updated on:2025-02-27 07:28:38
Apps running Android 11 are forced to use scoped storage. In this case, these apps cannot directly access external storage. The preserveLegacyExternalStorage flag is provided to enable apps updated to adapt to Android 11 to access previous data stored in external storage. However, the preserveLegacyExternalStorage flag is available only in Android SDK 30. Therefore, this error is reported.
To solve this problem, use either of the following solutions:
Upgrade the Android SDK compilation version to 30. That is, upgrade the tuyaversion plug-in.