Admob插页式广告错误代码:0

时间:2014-09-07 11:37:44

标签: libgdx admob

我尝试使用libgdx设置插页式广告。

logcat的

    09-07 14:30:22.626    1281-1299/com.fainosag.stickygrandpa.android W/GooglePlayServicesUtil﹕ Google Play services is missing.
09-07 14:30:22.636    1281-1299/com.fainosag.stickygrandpa.android E/GooglePlayServicesUtil﹕ GooglePlayServices not available due to error 1
09-07 14:30:22.806    1281-1298/com.fainosag.stickygrandpa.android W/Ads﹕ Could not fetch ad response from ad request service due to an Exception.
    java.lang.SecurityException: ConnectivityService: Neither user 10050 nor current process has android.permission.ACCESS_NETWORK_STATE.
            at android.os.Parcel.readException(Parcel.java:1425)
            at android.os.Parcel.readException(Parcel.java:1379)
            at android.net.IConnectivityManager$Stub$Proxy.isActiveNetworkMetered(IConnectivityManager.java:792)
            at android.net.ConnectivityManager.isActiveNetworkMetered(ConnectivityManager.java:878)
            at com.google.android.gms.internal.eh.<init>(Unknown Source)
            at com.google.android.gms.internal.ec.a(Unknown Source)
            at com.google.android.gms.internal.ec.b(Unknown Source)
            at com.google.android.gms.internal.dv.a(Unknown Source)
            at com.google.android.gms.internal.dv.bc(Unknown Source)
            at com.google.android.gms.internal.er$1.run(Unknown Source)
            at com.google.android.gms.internal.es$1.run(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
            at java.lang.Thread.run(Thread.java:856)
09-07 14:30:22.806    1281-1299/com.fainosag.stickygrandpa.android W/Ads﹕ There was a problem getting an ad response. ErrorCode: 0
09-07 14:30:23.077    1281-1281/com.fainosag.stickygrandpa.android W/Ads﹕ Failed to load ad: 0

Android启动器: http://pastebin.com/CBxQ7cNW AndroidManifest: http://pastebin.com/h3ftcrwH

可能是什么问题?

1 个答案:

答案 0 :(得分:1)

正如Exception所说,您需要向您的应用授予android.permission.ACCESS_NETWORK_STATE权限。添加你的AndroidManifest

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>