How can I view the shared preferences file using Android Studio?

前端 未结 14 1023
甜味超标
甜味超标 2020-11-27 11:33

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

相关标签:
14条回答
  • 2020-11-27 12:28

    To open shared preference in android studio

    Open device explorer file from right side- data>data> >shared_prefs

    find the attached image for more description

    0 讨论(0)
  • 2020-11-27 12:28

    I always find these commands useful in console:

    1. Find the correct file name

      adb shell

      ls /data/data/com.your.package/shared_prefs

    2. Get the file to local directory

      adb pull /data/data/com.your.package/shared_prefs/the_file_you_want $local_dir

    3. Check it in your $local_dir.

    0 讨论(0)
提交回复
热议问题