实施 firebase 崩溃分析的问题
issues in implementing firebase crash analytics
我正在尝试为我的 android 应用程序实施 firebase 崩溃分析 我添加了 firebase 站点中所示的依赖项,我还添加了 googleservices.json。现在,在进行更改后,我安装了我的地图,但它崩溃了。
我附上了 logcat 的截图。请帮助我。
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'
}
在您的 gradle 文件中添加以下内容:
apply plugin: 'com.google.firebase.crashlytics'
之后
buildFeatures {
}
添加
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
同时添加
implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
也在你的项目中build.gradle如果你还没有添加
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0'
在依赖项中然后这样做
我正在尝试为我的 android 应用程序实施 firebase 崩溃分析 我添加了 firebase 站点中所示的依赖项,我还添加了 googleservices.json。现在,在进行更改后,我安装了我的地图,但它崩溃了。
我附上了 logcat 的截图
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'
}
在您的 gradle 文件中添加以下内容:
apply plugin: 'com.google.firebase.crashlytics'
之后
buildFeatures {
}
添加
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
同时添加
implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
也在你的项目中build.gradle如果你还没有添加
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0'
在依赖项中然后这样做