Android Admob完全不工作:未找到Google Play services资源。请检查项目配置
我尝试了一切,应用了我找到的每一个解决方案。多次查看谷歌游戏服务。但admob仍不起作用 这是否意味着,如果我提交我的应用程序,admob将在提交后正常工作?如果没有,这是我的admob代码,如何修复Android Admob完全不工作:未找到Google Play services资源。请检查项目配置,android,admob,Android,Admob,我尝试了一切,应用了我找到的每一个解决方案。多次查看谷歌游戏服务。但admob仍不起作用 这是否意味着,如果我提交我的应用程序,admob将在提交后正常工作?如果没有,这是我的admob代码,如何修复 private AdView adView; adView = new AdView(this); adView.setAdSize(AdSize.BANNER); adView.setAdUnitId("My App Ad Unit ID");
private AdView adView;
adView = new AdView(this);
adView.setAdSize(AdSize.BANNER);
adView.setAdUnitId("My App Ad Unit ID");
// Add the AdView to the view hierarchy. The view will have no size
// until the ad is loaded.
LinearLayout layout = (LinearLayout) findViewById(R.id.adViewLayout);
layout.addView(adView);
// Create an ad request. Check logcat output for the hashed device ID to
// get test ads on a physical device.
AdRequest adRequest = new AdRequest.Builder()
// .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
// .addTestDevice("52EEC3DAD2FA75F22B44407D19072632")
.build();
// Start loading the ad in the background.
adView.loadAd(adRequest);
XML:
谷歌的人是这么说的
我不断收到错误“没有找到Google Play服务资源”。请检查您的项目配置,以确保包含资源。”
您可以安全地忽略此消息。你的应用程序仍将获取并提供横幅广告
这也被问了好几次,所以忽略它你能把错误日志上传到项目设置中吗
<LinearLayout
android:id="@+id/adViewLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:orientation="vertical" >
</LinearLayout>