android - 未找到 com.google.android.gms.internal.zzbfm 的类文件
问题描述
我正在开发一个使用 Google Maps 和 Googla Places API 的 android 应用程序。但是在运行项目后出现如下错误: 查看错误
我在项目中添加的依赖项是:
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.github.glomadrian:MaterialAnimatedSwitch:1.1@aar'
implementation 'com.firebase:geofire-android:2.3.1'
implementation 'com.github.d-max:spots-dialog:0.7@aar'
implementation 'com.android.support:appcompat-v7:27.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.android.support:design:27.0.1'
implementation 'com.android.support:cardview-v7:27.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.2'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.google.android.gms:play-services:11.8.0'
testImplementation 'junit:junit:4.12'
解决方案
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.2'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.google.android.gms:play-services:11.8.0'
将上述库的 Dependencies 版本更新为此
implementation 'com.google.firebase:firebase-database:+'
implementation 'com.google.firebase:firebase-auth:+'
implementation 'com.google.firebase:firebase-core:+'
implementation 'com.google.android.gms:play-services-maps:+'
不要添加所有依赖项删除implementation 'com.google.android.gms:play-services:+'
使用所需的单个依赖项,例如implementation 'com.google.android.gms:play-services-maps:+'
推荐阅读
- postgresql - Postgres查询优化-更新查询
- django-models - Django Azure sql server error The session limit for the database is 1200 and has been reached
- android - 旋转动画功能,
- php - 在 Laravel 中的模型中防止重复代码
- ruby-on-rails - Rails 保持参数 DRY
- android - 如何使用 tools:context 关联 Fragment 文件?
- java - 仅当主监听器更新时,如何将来自主 EventListener 的 MesageReceivedEvent 与线程内的新变量同步
- python - 使用 scipy solve_bvp 解决复杂的 BVP 问题
- email - 如何为 Firebase 身份验证编写红色电子邮件登录按钮?
- c# - asp.net 核心 web api FluentValidation 与控制器验证