如何查看使用的是Android Studio中的共享preferences文件?

问题描述:

我使用的是共享preferences存储一定的值,我的应用程序。我想看到的信息实际上是存储在手机上的文件。我发现有很多方法可以做到这一点Eclipse的,但我调试在Android工作室。我的手机是植根。我读了有root访问是非常重要的阅读这些类型的文件。如果没有办法,那么我将查找如何通过访问我的程序,然后将其输出到记录猫的信息。我们希望,不过,我可以查看手机上的文件直接,因为它是非常简单的。谢谢你。

I'm using shared preferences to store certain values for my app. I would like to see the file where the info is actually stored on my phone. I found many ways to do this on Eclipse, but I'm debugging on Android Studio. My phone is rooted. I read that having root access is important to read these types of files. If there is no way, then I will look up how to access the info through my program then output it to log cat. Hopefully, though, I can just view the file on the phone directly as it is much simpler. Thanks.

从Android的工作室,开始Android设备监视器,转到文件浏览器,浏览/数据/数据​​/<您的包> / shared_ $ P的名字$ PFS /。你会发现XML有......,你也可以复制它进行检查。

from Android Studio , start Android Device Monitor, go to File Explorer, and browse "/data/data/< name of your package >/shared_prefs/". You will find the XML there... and also you can copy it for inspection.