Настройка MoPub

Ответить
denyarage
Сообщения: 38
Зарегистрирован: 18 авг 2013, 22:36

Настройка MoPub

Сообщение denyarage » 20 янв 2014, 22:55

Привет.Помогите с настройкой Mopub
Застрял на 4 пункте
4. Load ads into your banner slots

Add the following code snippet into your Activity:

// Declare an instance variable for your MoPubView.
private MoPubView moPubView;
Add the following code snippet in your Activity's onCreate() method:

moPubView = (MoPubView) findViewById(R.id.adview);
moPubView.setAdUnitId("xxxxxxxxxxx"); // Enter your Ad Unit ID from www.mopub.com
moPubView.loadAd();
Add the following code snippet in your Activity's onDestroy() method:

moPubView.destroy();
Вложения
11.png
11.png (13.61 КБ) 2839 просмотров

Аватара пользователя
klblk
Сообщения: 1097
Зарегистрирован: 18 окт 2012, 11:17
Откуда: г. Красноярск

Re: Настройка MoPub

Сообщение klblk » 21 янв 2014, 05:55

если ctrl + shift + o не помогают, вероятно не подключена библиотека к проекту: Project->Properties->Android->Library->add (выбираем mopub-sdk, который должен был быть предварительно импортирован в эклипс).
собственно тут: http://help.mopub.com/customer/portal/articles/285186
написано почти в самом начале:
The MoPub Android SDK is a library project located in the Android/mopub-android-sdk folder. It requires Android version 1.6 (Donut) or greater.
Import the mopub-android-sdk library project into your workspace by clicking File > Import... and choosing Existing Projects into Workspace.
Click Browse... and select the Android/mopub-android-sdk folder. Then, click Finish.
In the Eclipse Package Explorer, right-click your project folder and select Properties.
Choose Android from the sidebar.
Click Add... under the Library section, and select the mopub-android-sdk project

denyarage
Сообщения: 38
Зарегистрирован: 18 авг 2013, 22:36

Re: Настройка MoPub

Сообщение denyarage » 21 янв 2014, 14:01

klblk писал(а):если ctrl + shift + o не помогают, вероятно не подключена библиотека к проекту: Project->Properties->Android->Library->add (выбираем mopub-sdk, который должен был быть предварительно импортирован в эклипс).
собственно тут: http://help.mopub.com/customer/portal/articles/285186
написано почти в самом начале:
The MoPub Android SDK is a library project located in the Android/mopub-android-sdk folder. It requires Android version 1.6 (Donut) or greater.
Import the mopub-android-sdk library project into your workspace by clicking File > Import... and choosing Existing Projects into Workspace.
Click Browse... and select the Android/mopub-android-sdk folder. Then, click Finish.
In the Eclipse Package Explorer, right-click your project folder and select Properties.
Choose Android from the sidebar.
Click Add... under the Library section, and select the mopub-android-sdk project
Ну я же написал что на 4 пункте застрял)Т.е. с 1-3 я все проделал.И библиотеку подключил.И еще приложение не запускается после настройки манифеста.

Ответить