从 DDMS 编辑共享首选项 [英] Edit shared preferences from DDMS

查看:25
本文介绍了从 DDMS 编辑共享首选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从 DDMS 编辑共享首选项值,如果我双击该文件,它不会保存更改.我做错了什么还是有特殊的插件?

I want to edit shared preferences values from DDMS, if I double click the file it doen't saves the changes. Do I do something wrong or there is special plugin for that?

推荐答案

首先,在执行此操作之前,您可能应该确保您的应用没有运行.

First, you should probably make sure your app isn't running before doing this.

您必须使用文件资源管理器选项.导航到

You have to use the File Explorer option. Navigate to

数据 -> com.yourpackage -> shared_pref

data -> com.yourpackage -> shared_pref

点击xml并在右上角点击pull.

Click the xml and at the top right click pull.

在您的计算机上编辑 xml.

Edit the xml on your computer.

完成后,点击push(也是右上角).

Once you're done, click push (also top right).

如果您将同一文件推送到同一设备的同一目录中,则下次启动应用程序时,您应该会看到更新后的值.

If you pushed the same file to the same device to the same directory, the next time you launch the app, you should see your updated values.

这篇关于从 DDMS 编辑共享首选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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