I get the following error when trying to build my application:
error: cannot access zzbfm class file for com.google.android.gms.internal.zzbfm not found
Here is my build.gradle file code:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "myapplicationid"
minSdkVersion 21
targetSdkVersion 27
multiDexEnabled true
versionCode 12
versionName "1.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
signingConfigs {
key {
keyAlias 'anavasis'
keyPassword 'anavasis'
storeFile file('jks_file_path')
storePassword 'anavasis'
}
}
buildTypes {
debug {
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { res.srcDirs = ['src/main/res', 'src/main/res/anim'] } }
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//compile 'com.google.maps.android:android-maps-utils:0.4+'
compile 'com.android.support:appcompat-v7:27.1.1'
compile 'com.google.android.gms:play-services:11.8.0'
compile 'io.ticofab.androidgpxparser:parser:0.2.0'
compile 'com.google.maps.android:android-maps-utils:0.4.+'
compile 'com.android.support:design:27.1.0'
compile 'com.android.support:support-v4:27.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-vector-drawable:27.1.1'
compile 'com.android.support:recyclerview-v7:27.1.0'
testCompile 'junit:junit:4.12'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.github.bumptech.glide:glide:3.6.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:cardview-v7:27.1.0'
compile 'com.google.code.gson:gson:2.4'
compile 'com.mcxiaoke.volley:library:1.0.19'
implementation 'com.android.support:multidex:1.0.3'
compile 'com.android.billingclient:billing:1.0'
compile 'com.google.firebase:firebase-core:16.0.1'
compile 'com.google.firebase:firebase-crash:16.0.1'
compile 'com.google.firebase:firebase-auth:16.0.1'
}
I have checked the answer here https://stackoverflow.com/a/50732851/1465756 but I do not have multiple firebase versions.
If I delete the 3 rows of compile firebase the app is running with no problems BUT I guess I should have them in my build.gradle.
In the top level gradle file use the following:
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.google.gms:google-services:4.0.2'
To be able to use the latest firebase verisons, also upgrade the Android Studio to version 3.1
If you're not using Android Studio 3.1 to develop your app, you will need to upgrade in order to get the correct version checking behavior within the IDE.
https://android-developers.googleblog.com/2018/05/announcing-new-sdk-versioning.html
Also update:
compile 'com.google.android.gms:play-services:11.8.0'
into this:
implementation 'com.google.android.gms:play-services:15.0.1'
Note: Don't use the combined play-services target. It brings in dozens of libraries, bloating your application. Instead, specify only the specific Google Play services APIs your app uses.
https://developers.google.com/android/guides/setup
Check this also:
Android | Cannot add all Google libraries for version 15.0.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With