gpt4 book ai didi

android - 找不到错误 : cannot access zzbfm class file for com. google.android.gms.internal.zzbfm

转载 作者:太空狗 更新时间:2023-10-29 13:03:44 29 4
gpt4 key购买 nike

我在尝试构建我的应用程序时遇到以下错误:

错误:无法访问 zzbfm找不到 com.google.android.gms.internal.zzbfm 的类文件

这是我的 build.gradle 文件代码:

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'


}

我在这里检查了答案https://stackoverflow.com/a/50732851/1465756但我没有多个 firebase 版本。

如果我删除 compile firebase 的 3 行,应用程序运行没有问题,但我想我应该将它们放在我的 build.gradle 中。

最佳答案

在顶级 gradle 文件中使用以下内容:

classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.google.gms:google-services:4.0.2'

为了能够使用最新的 firebase verisons,还要将 Android Studio 升级到 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


同时更新:

compile 'com.google.android.gms:play-services:11.8.0'

进入这个:

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

也检查一下:

Android | Cannot add all Google libraries for version 15.0.1

关于android - 找不到错误 : cannot access zzbfm class file for com. google.android.gms.internal.zzbfm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51610283/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com