【发布时间】:2020-12-13 17:11:27
【问题描述】:
我想在我的项目中添加 Crashlytics
我在下面添加依赖
implementation 'com.google.firebase:firebase-crashlytics:17.3.0'
我的项目依赖
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.google.android.gms:play-services-vision:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.google.android.gms:play-services-analytics:11.8.0'
implementation 'me.anwarshahriar:calligrapher:1.0'
implementation 'com.baoyz.swipemenulistview:library:1.3.0'
implementation 'joda-time:joda-time:2.9.9'
implementation 'me.dm7.barcodescanner:zbar:1.9.8'
testImplementation 'junit:junit:4.12'
implementation 'com.google.apis:google-api-services-storage:v1-rev135-1.23.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'com.google.firebase:firebase-iid:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-crash:11.8.0'
implementation 'com.google.firebase:firebase-firestore:11.8.0'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.wdullaer:materialdatetimepicker:3.6.3'
implementation 'com.android.support:support-v4:28.0.0-rc02'
implementation 'com.android.support:support-v13:28.0.0-rc02'
implementation 'com.android.support:cardview-v7:28.0.0-rc02'
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
implementation 'com.android.support:recyclerview-v7:28.0.0-rc02'
implementation 'com.android.support:design:28.0.0-rc02'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.code.gson:gson:2.8.5'
implementation group: 'org.apache.httpcomponents', name: 'httpmime', version:
'4.3.1'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.pusher:chatkit-android:1.0.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.itextpdf:itextg:5.5.10'
implementation
'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
implementation 'com.github.f0ris.sweetalert:library:1.5.1'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.google.firebase:firebase-crashlytics:17.3.0'
我得到以下错误
class com.google.android.gms.maps.model.LatLng, unresolved
supertypes:com.google.android.gms.internal.zzbfm
e: Supertypes of the following classes cannot be resolved.
Please make sure you have the required dependencies in the classpath:
在 BoM 下对所有 firebase 依赖项进行分组后的依赖项
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.google.android.gms:play-services-vision:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.google.android.gms:play-services-analytics:11.8.0'
implementation 'me.anwarshahriar:calligrapher:1.0'
implementation 'com.baoyz.swipemenulistview:library:1.3.0'
implementation 'joda-time:joda-time:2.9.9'
implementation 'me.dm7.barcodescanner:zbar:1.9.8'
testImplementation 'junit:junit:4.12'
implementation 'com.google.apis:google-api-services-storage:v1-rev135-1.23.0'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.wdullaer:materialdatetimepicker:3.6.3'
implementation 'com.android.support:support-v4:28.0.0-rc02'
implementation 'com.android.support:support-v13:28.0.0-rc02'
implementation 'com.android.support:cardview-v7:28.0.0-rc02'
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
implementation 'com.android.support:recyclerview-v7:28.0.0-rc02'
implementation 'com.android.support:design:28.0.0-rc02'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.code.gson:gson:2.8.5'
implementation group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.3.1'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.pusher:chatkit-android:1.0.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
// implementation files('libs/itextpdf-5.3.3.jar')
implementation 'com.itextpdf:itextg:5.5.10'
implementation 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
implementation 'com.github.f0ris.sweetalert:library:1.5.1'
implementation 'com.journeyapps:zxing-android-embedded:3.4.0'
//FireBase
implementation platform('com.google.firebase:firebase-bom:26.1.1')
implementation 'com.google.firebase:firebase-database'
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-messaging'
implementation 'com.google.firebase:firebase-iid'
implementation 'com.google.firebase:firebase-core'
implementation 'com.google.firebase:firebase-crash'
implementation 'com.google.firebase:firebase-firestore'
}
【问题讨论】:
-
添加 crashlytics 后,请编辑问题以同时显示 build.gradle 中的所有依赖项。
-
将问题编辑成什么?
标签: java android firebase crashlytics