从 DDMS 编辑共享首选项

Edit shared preferences from DDMS(从 DDMS 编辑共享首选项)
本文介绍了从 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 编辑共享首选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)