java能打开mob吗_无法让Admob工作
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;

使用微信扫描二维码关注公众号后,回复“查看码”获取查看码
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_ad_unit_id">
另外,我已将以下内容添加到Build.gradle中
dependencies {
compile 'com.android.support:support-v4:23.1.1'
compile 'com.google.android.gms:play-services-ads:8.3.0'
}
我想在我的应用上显示 Banner 广告,我第一次使用Admob . 从谷歌开发网站添加了上述代码 . 在应用程序的项目结构中,我还启用了Admob .
EDIT
我现在知道问题是什么,但无法修复 . 我已经从项目结构启用了Admob,它已经添加了
compile 'com.google.android.gms:play-services:8.4.0'
在build.gradle中 . 我查了一个 Banner 示例,示例在外部库中有播放服务,但它没有出现在我的应用程序中 .
在我的应用程序中,播放服务仅显示在build.gradle中,但不显示在外部库中 . 我只在外部库列中看到Android API 23平台,<1.8>,android-android-23和support-annotations . 我尝试清理项目,重建并尝试Invalidate cache / Restart . 他们都没有工作 . 有什么建议?