【问题标题】:Find files with Android Device Monitor from Visual Studio Emulator for Android使用 Android 设备监视器从 Visual Studio Emulator for Android 查找文件
【发布时间】:2017-01-19 12:04:57
【问题描述】:

我已经使用我的应用创建了文件,我想使用 Android 设备监视器访问这些文件。这是我使用的路径

string filepath = Path.Combine(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath, 
                               Android.OS.Environment.DirectoryDocuments, "somefilename.txt")

结果我在 Visual Studio Emulator for Android 上运行时得到以下路径:

/storage/emulated/0/Documents

如果我启动 ADM 并使用 文件资源管理器 我找不到这样的文件夹。因为我在模拟器上,所以我应该能够访问我认为的文件。我只有以下类似(空)文件夹:

storage/emulated/legacy
storage/sdcard0

同样在data/data/appName/data/media/0 下根本没有文件。我使用错误的路径吗?我不想用真机,因为每次都得拆线再重新接上,看看文件有没有变...

如果我尝试使用 adb shell ls /storage/emulated/0/ 我会得到

没有这样的文件或目录

模拟器运行的是 Android 5.0,应用程序是使用 Android 6.0 编译的。

【问题讨论】:

    标签: c# android xamarin filesystems visual-studio-emulator


    【解决方案1】:

    看来我found the right path到了符号链接:

    /mnt/shell/emulated/0/Documents

    【讨论】:

      猜你喜欢
      • 2015-06-11
      • 1970-01-01
      • 2014-09-03
      • 2016-08-22
      • 2015-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-23
      相关资源
      最近更新 更多