Lonely
V2EX  ›  Android

我从别的 App 的拷贝了一个 SharedPreferences 的 xml 文件到我 app 的 shared_prefs 目录下面,权限都给了, owner 和 group 都改成我 app 的了,为啥还是无法读取???求大神解答

  •  1
     
  •   Lonely · Dec 27, 2016 · 11786 views
    This topic created in 3503 days ago, the information mentioned may be changed or developed.

    这是截取的日志

    W/SharedPreferencesImpl: getSharedPreferences
                             java.io.FileNotFoundException: /data/user/0/com.test.myview/shared_prefs/admob.xml (Permission denied)
                                at java.io.FileInputStream.open(Native Method)
                                at java.io.FileInputStream.<init>(FileInputStream.java:146)
                                at android.app.SharedPreferencesImpl.loadFromDisk(SharedPreferencesImpl.java:119)
                                at android.app.SharedPreferencesImpl.-wrap1(SharedPreferencesImpl.java)
                                at android.app.SharedPreferencesImpl$1.run(SharedPreferencesImpl.java:90)
    
    Lonely
        1
    Lonely  
    OP
       Dec 27, 2016
    刚发的帖子显示时间是 2 天前。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3213 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 10:41 · PVG 18:41 · LAX 03:41 · JFK 06:41
    ♥ Do have faith in what you're doing.