【发布时间】:2021-10-18 06:20:07
【问题描述】:
我正在尝试为我的 android 应用程序实现 firebase 崩溃分析,我添加了如 firebase 站点中所示的依赖项,我还添加了 googleservices.json。现在,在进行更改后,我安装了我的地图,但它崩溃了。
应用的build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 30
buildToolsVersion "30.0.1"
defaultConfig {
applicationId "com.android.quotesapp"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation 'com.android.support:design:28.0.0'
implementation("androidx.recyclerview:recyclerview:1.2.1")
// For control over item selection of both touch and mouse driven selection
implementation("androidx.recyclerview:recyclerview-selection:1.1.0")
implementation 'com.squareup.picasso:picasso:2.71828'
implementation("com.android.volley:volley:1.2.0")
implementation "androidx.cardview:cardview:1.0.0"
implementation platform('com.google.firebase:firebase-bom:28.3.1')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-core:19.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
【问题讨论】:
-
添加一些代码示例,从那里你得到这个崩溃
-
@AvinashKumarSingh 应用程序在打开后崩溃
-
添加一些有问题的代码实现,只有我才能知道你做错了什么
-
@AvinashKumarSingh 我不知道要添加什么代码
-
@AvinashKumarSingh 执行 firebase 崩溃分析后发生错误,只需指出 logcat 代码中的任何部分,我将共享代码
标签: android firebase crashlytics android-app-indexing