markzhai / markzhai/AndroidPerformanceMonitor
Log路径生成失败
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 6.7k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
设备:nexus 6
版本:Android 7.1.1
blockcanary版本:1.5.0
堆栈信息如下:
ava.io.FileNotFoundException: /data/storage/emulated/0/Android/data/com.test.testapm/cache/looper-2018-07-06_17-09-29.376.log (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:221)
at java.io.FileOutputStream.(FileOutputStream.java:140)
at com.github.moduth.blockcanary.LogWriter.save(LogWriter.java:108)
at com.github.moduth.blockcanary.LogWriter.save(LogWriter.java:56)
at com.github.moduth.blockcanary.BlockCanaryInternals$1.onBlockEvent(BlockCanaryInternals.java:63)
at com.github.moduth.blockcanary.LooperMonitor$1.run(LooperMonitor.java:80)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
发现BlockCanaryInternals#getPath方法中,最后在目录前面加上了Data目录,导致目录生成失败。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with BlockCanaryInternals#getPath and compare the generated directory with the path used by LogWriter.save at LogWriter.java:108. Reproduce the failure on the reported Android configuration if available, then verify that log creation no longer raises FileNotFoundException and that the generated path is valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile, performance
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100