java - 实施 'com.google.android.gms:play-services-ads:18.1.0'
问题描述
我想在我的项目中添加广告,但是当我添加下面的行时,它不起作用:
implementation 'com.google.android.gms:play-services-ads:18.1.0'
这些是来自的依赖项build.gradle
:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.core:core-ktx:1.0.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'com.google.android.gms:play-services-ads:18.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
解决方案
尝试创建一个新项目并复制旧项目文件并粘贴到一个新项目中。如果它应该帮助!
推荐阅读
- javascript - 如何在自定义构建的日历中呈现事件
- google-docs - 使用 google doc api 替换 google docs 中的图像时图像被裁剪
- javascript - console.table 不显示观察者
- php - php 7.3.8版本未启用samesite cookie属性功能
- laravel - 如何在 env 文件中设置条带公钥
- php - laravel,雄辩的条件在 yajra 数据表中得到结果
- arrays - 将列附加到 pyspark 数据框中的数组
- node.js - 如何使用 MongoDB 的 node.js 驱动程序为 `findOneAndUpdate` 指定写入关注点?
- tensorflow - 在 python 中保存 Keras/Sklearn 并在 tensorflow.js 中加载保存的模型
- c# - 列表框中的复选框