I have tried to integrate Admob Ads. The very first step is to add these statements to build.gradle
.
我试着整合Admob广告,第一步是将这些语句添加到build.gradle中。
Project Level
项目级别
dependencies {
classpath 'com.google.gms:google-services:3.0.0'
}
Module level:
模块级:
dependencies {
compile 'com.google.firebase:firebase-ads:9.2.0'
}
apply plugin: 'com.google.gms.google-services'
But when synced getting
但是,当同步得到
Failed to resolve: com.google.firebase:firebase-ads:9.2.0
How can I integrate these advertisements?
我如何整合这些广告?
5 个解决方案
#1
1
Looks like you have a typo with the version.
看起来您的版本有错误。
Replace compile 'com.google.firebase:firebase-ads:9.2.0'
with compile 'com.google.firebase:firebase-ads:9.0.2'
使用编译'com.google.firebase:firebase-ads:9.2.0' ',用编译'com.google.firebase:firebase-ads:9.0.2'
Update: 9.2.0 is a valid version. You might be able to use 9.2.0, but you have to update Google Services from the SDK Manager. If that doesn't work, then stick with 9.0.2 until we find something.
更新:9.2.0是一个有效的版本。您可能可以使用9.2.0,但是您必须从SDK管理器更新谷歌服务。如果这不行,那么坚持9。0,直到我们找到一些东西。
#2
11
You have to update your Google Play Service to the last version, currently is 31, also your Google Repository must be the last too, now is 29.
你必须更新谷歌游戏服务到最后一个版本,目前是31,你的谷歌库也必须是最后一个,现在是29。
#3
2
I just integrated Firebase analytics as well. I had the same problem though! What seems to fix the problem is changing compile 'com.google.firebase:firebase-core:9.2.0'
to compile 'com.google.firebase:firebase-core:9.0.2'
. Basically the 9.2.0
should be 9.0.2
. I was using this tutorial, and it said to use 9.2.0
. I am assuming either the tutorial has a typo or something needs to be updated. This will work though! :)
我只是综合了Firebase分析。我也有同样的问题!解决问题的方法是修改编译'com.google.firebase:firebase-core:9.2.0'来编译'com.google.firebase:firebase-core:9.0.2'。基本上9。2应该是9。2。我正在使用这个教程,它说要使用9.2.0。我假设本教程中有一个错误或需要更新的东西。尽管这将工作!:)
#4
1
Updating google services in SDK Manager helped me.
在SDK管理器中更新谷歌服务帮助了我。
#5
0
Update all your google services version from 9.0.2 to 9.2.0.
将所有谷歌服务版本从9.0.2升级到9.2.0。
#1
1
Looks like you have a typo with the version.
看起来您的版本有错误。
Replace compile 'com.google.firebase:firebase-ads:9.2.0'
with compile 'com.google.firebase:firebase-ads:9.0.2'
使用编译'com.google.firebase:firebase-ads:9.2.0' ',用编译'com.google.firebase:firebase-ads:9.0.2'
Update: 9.2.0 is a valid version. You might be able to use 9.2.0, but you have to update Google Services from the SDK Manager. If that doesn't work, then stick with 9.0.2 until we find something.
更新:9.2.0是一个有效的版本。您可能可以使用9.2.0,但是您必须从SDK管理器更新谷歌服务。如果这不行,那么坚持9。0,直到我们找到一些东西。
#2
11
You have to update your Google Play Service to the last version, currently is 31, also your Google Repository must be the last too, now is 29.
你必须更新谷歌游戏服务到最后一个版本,目前是31,你的谷歌库也必须是最后一个,现在是29。
#3
2
I just integrated Firebase analytics as well. I had the same problem though! What seems to fix the problem is changing compile 'com.google.firebase:firebase-core:9.2.0'
to compile 'com.google.firebase:firebase-core:9.0.2'
. Basically the 9.2.0
should be 9.0.2
. I was using this tutorial, and it said to use 9.2.0
. I am assuming either the tutorial has a typo or something needs to be updated. This will work though! :)
我只是综合了Firebase分析。我也有同样的问题!解决问题的方法是修改编译'com.google.firebase:firebase-core:9.2.0'来编译'com.google.firebase:firebase-core:9.0.2'。基本上9。2应该是9。2。我正在使用这个教程,它说要使用9.2.0。我假设本教程中有一个错误或需要更新的东西。尽管这将工作!:)
#4
1
Updating google services in SDK Manager helped me.
在SDK管理器中更新谷歌服务帮助了我。
#5
0
Update all your google services version from 9.0.2 to 9.2.0.
将所有谷歌服务版本从9.0.2升级到9.2.0。