android - 添加 admob 广告库后混合版本可能会导致运行时崩溃
问题描述
我知道有很多这样的问题,但没有找到任何具有 Admob 广告依赖的问题,我只想在我的应用中使用 Admob 广告,我从官方网站添加了广告依赖implementation 'com.google.android.gms:play-services-ads:15.0.0'
。
但向我展示了这个警告:
All gms/firebase libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 15.0.1, 15.0.0. Examples include com.google.android.gms:play-services-ads-identifier:15.0.1 and com.google.android.gms:play-services-ads:15.0.0 less... (Ctrl+F1)
There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion.)
我只想在没有 Firebase 的情况下使用广告依赖。
解决方案
检查您的 app-gradle 文件,您的依赖项有冲突。更新以下内容
com.google.android.gms:play-services-ads:15.0.1
推荐阅读
- javascript - 是否可以从 Stackdriver 日志中提取特定数据并用于变量,如果可以,我将如何处理?
- node.js - 出现 500 服务器错误的原因可能是什么?
- css - 无法在反应中导入css文件
- android - 带电容器的离子和 Android 未在 IntelliJ 中运行模拟器
- php - 更改 Woocommerce 产品类别列表的字符串逗号分隔符
- javascript - 用 Jest 测试 LightningChartJS
- google-cloud-platform - 如何授予服务帐户对两个项目的访问权限?
- angular - 使用 ng-select 时无法读取 null 的属性“$ngoptionlabel”
- controller - SATA控制器
- python - 将 Poly1305 与 ChaCha20 一起使用的正确方法?