Страница 1 из 1

Настройка MoPub

Добавлено: 20 янв 2014, 22:55
denyarage
Привет.Помогите с настройкой 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();

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

Добавлено: 21 янв 2014, 05:55
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

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

Добавлено: 21 янв 2014, 14:01
denyarage
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 я все проделал.И библиотеку подключил.И еще приложение не запускается после настройки манифеста.