Я пытаюсь разместить рекламу в своем приложении, но по какой-то причине рекламный баннер не работает, который подключен, потому что рекламное объявление работает.Android AdMob Banner не работает
вот мой XML:
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/textView1"
android:layout_alignLeft="@+id/fartDisplay"
ads:adSize="BANNER"
ads:adUnitId="My-Ad-Unit-Id" >
</com.google.android.gms.ads.AdView>
и вот мой Java-код:
private AdView mAdView;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_fart);
mAdView = (AdView) findViewById(R.id.adView);
mAdView.loadAd(new AdRequest.Builder().build());
}
им также получать это на LogCat:
09-04 19:34:54.919: E/GooglePlayServicesUtil(2841): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
09-04 19:34:54.929: E/GooglePlayServicesUtil(2841): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
У меня есть метаданные и i изменил идентификатор устройства на строку, чтобы он не был видимым, а im с помощью eclipse, gradle только в студии android нет? – Pachu
Выполните следующие шаги для Eclipse IDE https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start – Psypher