我正在开发一个需要 Android 设备上的存储访问权限的 Flutter 应用程序。该应用程序在 Android 12 版本之前可以正常运行,但我在 Android 13 设备上遇到了存储权限问题。我遵循请求存储权限的标准实现,并在应用程序的 AndroidManifest.xml 文件中包含必要的权限声明。但是,在 Android 13 设备上,应用程序无法访问外部存储并遇到权限错误。
I/ViewRootImpl@f9221bd[MainActivity](25559): handleAppVisibility mAppVisible = true visible = false
I/SurfaceView@31e8ae4(25559): onWindowVisibilityChanged(8) false io.flutter.embedding.android.FlutterSurfaceView{31e8ae4 V.E...... ........ 0,0-720,1570} of ViewRootImpl@f9221bd[MainActivity]
I/SurfaceView@31e8ae4(25559): Changes: creating=false format=false size=false visible=true alpha=false hint=false mUseAlpha=false visible=true left=false top=false
I/SurfaceView@31e8ae4(25559): 52333284 Cur surface: Surface(name=null)/@0xfd2426a
I/SurfaceView@31e8ae4(25559): applyTransactionOnVriDraw: vri = ViewRootImpl@f9221bd[MainActivity] fRS = false t = 0xb40000709aa32400 android.view.SurfaceView.performSurfaceTransaction:959 android.view.SurfaceView.updateSurface:1105 android.view.SurfaceView.onWindowVisibilityChanged:371
I/ViewRootImpl@f9221bd[MainActivity](25559): applyTransactionOnDraw: mRemoved = false isHardwareEnabled = true t = 0xb40000709aa32400android.view.SurfaceView.applyTransactionOnVriDraw:2048 android.view.SurfaceView.performSurfaceTransaction:959 android.view.SurfaceView.updateSurface:1105 android.view.SurfaceView.onWindowVisibilityChanged:371 android.view.View.dispatchWindowVisibilityChanged:15943 …Run Code Online (Sandbox Code Playgroud)