【问题标题】:Android Crashlytics InterruptedIOException timeoutAndroid Crashlytics InterruptedIOException 超时
【发布时间】:2020-07-29 10:39:18
【问题描述】:

我将 Crashlytics 添加到项目 build.gradle:

classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'

到应用程序 build.gradle:

dependencies {
    implementation 'com.google.firebase:firebase-crashlytics:17.1.1'
    implementation 'com.google.firebase:firebase-analytics-ktx:17.4.4'
}

apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

现在启动我的应用后出现此错误:

E/FirebaseCrashlytics: Settings request failed.
    java.io.InterruptedIOException: timeout
        at okhttp3.internal.connection.RealCall.timeoutExit(RealCall.kt:384)
        at okhttp3.internal.connection.RealCall.maybeReleaseConnection(RealCall.kt:346)
        at okhttp3.internal.connection.RealCall.noMoreExchanges$okhttp(RealCall.kt:310)
        at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:205)
        at okhttp3.internal.connection.RealCall.execute(RealCall.kt:148)
        at com.google.firebase.crashlytics.internal.network.HttpRequest.execute(HttpRequest.java:129)
        at com.google.firebase.crashlytics.internal.settings.network.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:86)
        at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:200)
        at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:193)
        at com.google.android.gms.tasks.zzp.run(Unknown Source:2)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:60)
        at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.io.IOException: Canceled
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:72)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
        at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197)
        at okhttp3.internal.connection.RealCall.execute(RealCall.kt:148) 
        at com.google.firebase.crashlytics.internal.network.HttpRequest.execute(HttpRequest.java:129) 
        at com.google.firebase.crashlytics.internal.settings.network.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:86) 
        at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:200) 
        at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:193) 
        at com.google.android.gms.tasks.zzp.run(Unknown Source:2) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
        at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:60) 
        at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27) 
        at java.lang.Thread.run(Thread.java:764) 

我尝试过的:

  • 重建项目
  • 使 Android Studio 缓存失效
  • 下载和更新 google-services.json
  • 将 ext.enableCrashlytics = true 添加到 build.gradle

但我没有结果

【问题讨论】:

  • 这能回答你的问题吗? Crashlytics Fabric : Failed to execute task
  • 您的手机上网正常吗?
  • @JavadDehban 我从那里尝试了所有解决方案,但都没有帮助
  • @matdev 是的,对我们服务器的互联网请求工作
  • 那你的服务器上网正常吗?

标签: android crashlytics crashlytics-android


【解决方案1】:

这个错误似乎只发生在调试风格中。根据 Firebase 支持,解决方案应该是:

由于您使用不同的应用风格,您应该为每个风格设置不同的包名称:com.example.prod 和 com.example.debug。 这些应在控制台中配置为不同的应用程序。

【讨论】:

    【解决方案2】:

    现在好了。而我什么也没做。显然这是 Firebase 方面的临时问题

    【讨论】:

      猜你喜欢
      • 2018-06-10
      • 1970-01-01
      • 1970-01-01
      • 2018-06-12
      • 1970-01-01
      • 2018-05-28
      • 2019-04-13
      • 1970-01-01
      • 2013-10-09
      相关资源
      最近更新 更多