Device File Explorer /There were errors downloading files and/or directories:/ Cannot delete ‘C:\Users\Micenlee\Desktop\BookStore.db’

image-20220914125755795

上 Android 课的时候,到了SQLite。在 Device File Explorer 中准备把 db文件另存为时候。

image-20220914125946032

保存目录下有同名文件

image-20220914130225271

保存就报错说,删除不了原来同名文件。

stackoverflow该问题解答(唯一中文就是俺写的):https://stackoverflow.com/questions/52202720/android-studio-device-file-explorer-gets-stuck-when-downloading-a-file

实际原因:

自己在AS中的DB Browser 中已经打开了,而在win11 下,已经打开的文件是删除不了的

image-20220914130547642

解决:

打开DB Browser ,跟图操作

image-20220914130751440

把这所有的connection 全 删了(选中一个点一下➖)

image-20220914130827360

然后再回去 Save As就好了

image-20220914131001014