Answer the question
In order to leave comments, you need to log in
Why does an error occur and admob won't load?
I can't add ads.
Here updated all the components and created a new project. Did according to the instructions . As a result I get:
05-26 21:54:19.159 8124-8124/com.pervayaavto.mobile E/PhonePolicy﹕ Could not preload class for phone policy: com.android.internal.policy.impl.PhoneWindow$ContextMenuCallback
05-26 21:54:20.399 8124-8124/com.pervayaavto.mobile E/dalvikvm﹕ Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
05-26 21:54:22.059 8124-8124/com.pervayaavto.mobile E/dalvikvm﹕ Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.ij.a
05-26 21:54:22.079 8124-8124/com.pervayaavto.mobile E/dalvikvm﹕ Could not find class 'android.app.Notification$BigTextStyle', referenced from method com.google.android.gms.common.ij.b
// Создание экземпляра adView.
adView = new AdView(this);
adView.setAdUnitId("ca-app-pub-7684432941227028/6051161799");
adView.setAdSize(AdSize.BANNER);
// Поиск разметки LinearLayout (предполагается, что ей был присвоен
// атрибут android:id="@+id/mainLayout").
RelativeLayout layout = (RelativeLayout)findViewById(R.id.mainLayout);
// Добавление в разметку экземпляра adView.
layout.addView(adView);
// Инициирование общего запроса.
AdRequest adRequest = new AdRequest.Builder().addTestDevice("93A9F945BDD6BC90ABAD72F4BC7D7FC3").build();
// Загрузка adView с объявлением.
adView.loadAd(adRequest);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question