当前位置:   article > 正文

接google Admob小记_admob received error http response code: 400

admob received error http response code: 400

对于unity,直接用unity导出apk时,unity会合并manifest,把google的$Application_ID合并过来,但它还不识别'$'符号。

所以这里必须要用gradle导出工程后编译。

注意build.gradle中添加项:

compile 'com.google.android.gms:play-services-ads:11.4.0'
 

可能会出现:

You have not accepted the license agreements of the following SDK components:
  [SDK Patch Applier v4, Android Support Repository, Google Repository].

 

 

You have not accepted the license agreements of the following SDK components:
  [Android Support Repository].

许可信任等问题。

 

处理方式:

echo y | android update sdk --no-ui --all --filter "extra-google-m2repository"

echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"

 

还要注意接好sdk后,测试时可能会遇到如下问题:

Received error HTTP response code: 400

There was a problem getting an ad response. ErrorCode: 0

Failed to load ad: 0

0_ERROR_CODE_INTERNAL_ERROR

这时检查后台付款信息,需要配置成功后才能投放。

另外,应用必须在谷歌商店提交,至少是alpha版本不然一样不会填充广告。

 

对于gradle中

项目级build.gradle的

  1. allprojects {
  2.     repositories {
  3.         google() 如果不支持google() 可以改成maven{url 'https://maven.google.com'}
  4.         jcenter()
  5.     }
  6. }
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/198731
推荐阅读
相关标签
  

闽ICP备14008679号