为什么我将A problem occurred while reading the Crashlytics log file.
加入 logcat (见下文)?我应该忽略吗?我不想为我的 AndroidManifest.xml 添加读写权限:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
Logcat输出:
04-01 23:27:12.258 28900-28920/com.playgong.stg.dbg E/Fabric﹕ A problem occurred while reading the Crashlytics log file.
java.io.IOException: lseek failed: EBADF (Bad file number)
at java.io.RandomAccessFile.seek(RandomAccessFile.java:603)
at io.fabric.sdk.android.services.common.QueueFile.readElement(QueueFile.java:186)
at io.fabric.sdk.android.services.common.QueueFile.forEach(QueueFile.java:425)
at com.crashlytics.android.LogFileManager.getByteStringForLog(LogFileManager.java:162)
at com.crashlytics.android.SessionDataWriter.writeSessionEvent(SessionDataWriter.java:187)
at com.crashlytics.android.CrashlyticsUncaughtExceptionHandler.writeSessionEvent(CrashlyticsUncaughtExceptionHandler.java:952)
at com.crashlytics.android.CrashlyticsUncaughtExceptionHandler.doWriteNonFatal(CrashlyticsUncaughtExceptionHandler.java:988)
at com.crashlytics.android.CrashlyticsUncaughtExceptionHandler.access$500(CrashlyticsUncaughtExceptionHandler.java:56)
at com.crashlytics.android.CrashlyticsUncaughtExceptionHandler$9.run(CrashlyticsUncaughtExceptionHandler.java:368)
at com.crashlytics.android.CrashlyticsExecutorServiceWrapper$1.run(CrashlyticsExecutorServiceWrapper.java:75)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at io.fabric.sdk.android.services.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:46)
at io.fabric.sdk.android.services.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:13)
at java.lang.Thread.run(Thread.java:841)
Caused by: libcore.io.ErrnoException: lseek failed: EBADF (Bad file number)
at libcore.io.Posix.lseek(Native Method)
at libcore.io.ForwardingOs.lseek(ForwardingOs.java:89)
at java.io.RandomAccessFile.seek(RandomAccessFile.java:601)
at io.fabric.sdk.android.services.common.QueueFile.readElement(QueueFile.java:186)
at io.fabric.sdk.android.services.common.QueueFile.forEach(QueueFile.java:425)
at com.crashlytics.android.LogFileManager.getByteStringForLog(LogFileManager.java:162)
at com.crashlytics.android.SessionDataWriter.writeSessionEvent(SessionDataWriter.java:187)
at com.crashlytics.android.CrashlyticsUncaughtExceptionHandler.writeSessionEvent(CrashlyticsUncaughtExceptionHandler.java:952)
at com.crashlytics.android.CrashlyticsUncaughtExceptionHandler.doWriteNonFatal(CrashlyticsUncaughtExceptionHandler.java:988)
at com.crashlytics.android.CrashlyticsUncaughtExceptionHandler.access$500(CrashlyticsUncaughtExceptionHandler.java:56)
at com.crashlytics.android.CrashlyticsUncaughtExceptionHandler$9.run(CrashlyticsUncaughtExceptionHandler.java:368)
at com.crashlytics.android.CrashlyticsExecutorServiceWrapper$1.run(CrashlyticsExecutorServiceWrapper.java:75)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at io.fabric.sdk.android.services.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:46)
at io.fabric.sdk.android.services.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:13)
at java.lang.Thread.run(Thread.java:841)
答案 0 :(得分:1)
将Crashlytics更新为2.2.3版本已修复。像这样:
compile('com.crashlytics.sdk.android:crashlytics:2.2.3@aar') {
transitive = true;
}
看起来问题出现在2.2.2版本和2.2.3中它已修复。