嘗試將我在 android 中的項目與 firebase 連接,但是當(dāng)添加依賴項并運行項目時,出現(xiàn)錯誤。我嘗試了不同版本的 firebase 核心,但仍然出現(xiàn)相同的錯誤消息,我也提高了 API 和最小 SDK 的級別,但它仍然無法正常工作。漸變代碼是:buildscript { repositories { maven { url 'https://maven.fabric.io/public' } } dependencies { classpath 'io.fabric.tools:gradle:1.+' }}apply plugin: 'com.android.application'apply plugin: 'io.fabric'apply plugin: 'com.amazonaws.appsync'repositories { maven { url 'https://maven.fabric.io/public' }}apply plugin: 'com.android.application'android { lintOptions { checkReleaseBuilds false // Or, if you prefer, you can continue to check for errors in release builds, // but continue the build even when errors are found: abortOnError false } compileSdkVersion 28 defaultConfig { applicationId 'com.example.example' minSdkVersion 21 targetSdkVersion 28 versionCode 26 versionName "2.5" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true multiDexEnabled true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } productFlavors { }}dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.0' implementation 'com.android.support:design:27.1.1' implementation 'com.android.support:support-vector-drawable:27.1.1' implementation 'com.android.support:multidex:1.0.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' implementation('com.crashlytics.sdk.android:crashlytics:2.9.6@aar') {嘗試安裝應(yīng)用程序時顯示此錯誤:編譯失敗;有關(guān)詳細信息,請參閱編譯器錯誤輸出。錯誤:無法訪問 com.google.android.gms.internal.zzbck 的 zzbck 類文件未找到
1 回答

德瑪西亞99
TA貢獻1770條經(jīng)驗 獲得超3個贊
您應(yīng)該更新到最新版本的 play-services 和 firebase。
此外,您應(yīng)該避免使用捆綁版本的 Google Play 服務(wù)??梢杂羞x擇地包含 Google Play 服務(wù),從而使 APK 大小更小。
例如
implementation 'com.google.android.gms:play-services-ads:18.1.1'
或者至少
implementation 'com.google.android.gms:play-services:18.0.0'
implementation 'com.google.firebase:firebase-core:17.0.1'
添加回答
舉報
0/150
提交
取消