如何查看使用的是Android Studio中的共享preferences文件? [英] How can I view the shared preferences file using Android Studio?

查看:634
本文介绍了如何查看使用的是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.

这篇关于如何查看使用的是Android Studio中的共享preferences文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆