Android Crashlytics中断异常超时

Android Crashlytics中断异常超时,android,crashlytics,crashlytics-android,Android,Crashlytics,Crashlytics Android,我将Crashlytics添加到project build.gradle中: classpath 'com.google.gms:google-services:4.3.3' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0' dependencies { implementation 'com.google.firebase:firebase-crashlytics:17.1.1' impleme

我将Crashlytics添加到project build.gradle中:

classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
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'
和应用程序build.gradle:

classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
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

但是我没有结果

似乎这个错误只发生在调试版本中。根据Firebase支持,解决方案应为:

由于您使用的是不同的AppFlavor,因此每个>flavor都应该有不同的包名:com.example.prod和com.example.debug。 这些应用程序应在控制台中配置为不同的应用程序


现在没事了。我什么也没做。显然,这是Firebase方面的一个暂时问题

这是否回答了您的问题?你的手机可以上网吗?@JavadDehban我从那里尝试了所有的解决方案,但都没有helped@matdev是的,对我们的服务器工作的internet请求那么您的服务器的internet访问是否正常?