Where in an Eclipse project might one encounter a shared preferences file?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
SharedPreferences are stored in an xml file in the app data folder, i.e.
or the default preferences at:
SharedPreferences added during runtime are not stored in the Eclipse project.
Note: Accessing
/data/data/<package_name>
requires superuser privilegesThe data is stored on the device, in your application's private data area. It is not in an Eclipse project.
Use http://facebook.github.io/stetho/ library to access your app's local storage with chrome inspect tools. You can find sharedPreference file under Local storage -> < your app's package name >
Just to save some of you time...
On my Galaxy S v.2.3.3 Shared Preferences are not stored in:
/data/data/YOUR_PACKAGE_NAME/shared_prefs/YOUR_PREFS_NAME.xml
but are now located in:
/dbdata/databases/YOUR_PACKAGE_NAME/shared_prefs/YOUR_PREFS_NAME.xml
I believe they changed this in 2.3
Preferences can either be set in code or can be found in res/xml/preferences.xml. You can read more about preferences on the Android SDK website.
I just tried to get path of shared preferences below like this.This is work for me.