Edit shared preferences from DDMS

戏子无情 提交于 2019-12-01 01:23:30

问题


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?


回答1:


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

You have to use the File Explorer option. Navigate to

data -> com.yourpackage -> shared_pref

Click the xml and at the top right click pull.

Edit the xml on your computer.

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.



来源:https://stackoverflow.com/questions/14913026/edit-shared-preferences-from-ddms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!