У меня проблемы с настройкой Crashlytics для работы с Amazon Fire TV.У меня есть проект, который нацелен на Android, Android TV и FireTV.Crashlytics, кажется, работает отлично для Android и Android TV, но я получаю ошибку при запуске, говоря, что время ожидания истекло во время инициализации.
Вот ошибка:
04-16 12:30:11.051 6661-6661/com.acompany.app.firetvclient E/CrashlyticsCore: Crashlytics timed out during initialization.
java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(FutureTask.java:176)
at com.crashlytics.android.core.CrashlyticsCore.finishInitSynchronously(CrashlyticsCore.java:727)
at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:298)
at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:211)
at io.fabric.sdk.android.InitializationTask.onPreExecute(InitializationTask.java:44)
at io.fabric.sdk.android.services.concurrency.AsyncTask.executeOnExecutor(AsyncTask.java:611)
at io.fabric.sdk.android.services.concurrency.PriorityAsyncTask.executeOnExecutor(PriorityAsyncTask.java:43)
at io.fabric.sdk.android.Kit.initialize(Kit.java:69)
at io.fabric.sdk.android.Fabric.initializeKits(Fabric.java:466)
at io.fabric.sdk.android.Fabric.init(Fabric.java:410)
at io.fabric.sdk.android.Fabric.setFabric(Fabric.java:368)
at io.fabric.sdk.android.Fabric.with(Fabric.java:339)
at com.crashlytics.android.CrashlyticsInitProvider.onCreate(CrashlyticsInitProvider.java:27)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1696)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1671)
at android.app.ActivityThread.installProvider(ActivityThread.java:5340)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4935)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4861)
at android.app.ActivityThread.access$1500(ActivityThread.java:160)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1382)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5597)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:984)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Вот мои файлы build.gradle для моего проекта и цель firetv:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven{
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.28.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url "https://maven.fabric.io/public"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.acompay.app.firetvclient"
minSdkVersion 22
targetSdkVersion 28
versionCode 260
versionName "2.6.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildToolsVersion '28.0.3'
}
dependencies {
compileOnly files('libs/amazon-device-messaging-1.0.1.jar')
implementation files('assets/api_key.txt')
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:leanback-v17:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
implementation project(':bftools')
}
apply plugin: 'com.google.gms.google-services'
Нужно ли по-разному настраивать Crashlytics для Fire TV?Я не очень понимаю, почему я получаю эту ошибку.