Android环境.isExternalStorageLegacy()始终返回true

Android环境.isExternalStorageLegacy()始终返回true,android,scoped-storage,Android,Scoped Storage,我构建了一个小应用程序,用我指定的应用程序的AndroidManifest.xml中的compileSdkVersion 29,targetSdkVersion 29编译它 android:requestLegacyExternalStorage="false" 或者完全移除它。我从Android 10 emulator(Android Studio附带的emulator的最新版本)卸载该应用程序。然后安装并检查环境;它总是返回真的。我缺少什么?好的,找到原因:我还使用了AndroidMani

我构建了一个小应用程序,用我指定的应用程序的AndroidManifest.xml中的compileSdkVersion 29,targetSdkVersion 29编译它

android:requestLegacyExternalStorage="false"

或者完全移除它。我从Android 10 emulator(Android Studio附带的emulator的最新版本)卸载该应用程序。然后安装并检查环境;它总是返回真的。我缺少什么?

好的,找到原因:我还使用了AndroidManifest.xml:

android:sharedUserId="some.package.name.shared"
android:sharedUserLabel="@string/some_uuid_name"
其他传统模式的应用程序仍在安装。删除sharedUserId(或者我猜,卸载其他共享该ID的遗留应用程序)可以解决这个问题