Unable to open stack trace file '/data/anr/traces.txt/: Permission denied

后端 未结 3 603
予麋鹿
予麋鹿 2021-01-15 05:59

I am novice android developer & i am learning android from this book http://www.informit.com/store/product.aspx?isbn=9780321673350

I am on chapter 10.

相关标签:
3条回答
  • Try getting rid of the trailing slash; this is a file, not a directory.

    0 讨论(0)
  • 2021-01-15 06:13

    Make sure adb is in you system path or cd to it first.
    Then try the following:

    adb shell
    cd \data
    chmod 777 anr
    

    Then try again.
    Don't ask me why the permissions go wonky, but I've had this too.

    0 讨论(0)
  • 2021-01-15 06:35

    I solved this error by passing the correct context to the Traces class method call.

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