I solve it! The problem wan in AndroidManifest.xml in line Code : <meta-data android:value="a14adf472974adb" android:name="Test" />
Test is my AdMob campain name and here is the attribute name from publisher id. Here is the correct line <meta-data android:value="a14adf472974adb" android:name="ADMOB_PUBLISHER_ID" /> Thnkx On Oct 22, 12:32 am, Wayne Wenthin <[email protected]> wrote: > The first two lines of the Logcat output pretty much sum it up:10-21 > 17:57:25.064: INFO/AdMob SDK(722): The user ID is null > 10-21 17:57:25.124: DEBUG/AdMob SDK(722): Publisher ID read from > AndroidManifest.xml is null > > The user ID is null. I'm assuming that it must be put in the > AndroidManifest.xml based on the second line. > > On Wed, Oct 21, 2009 at 11:03 AM, erick nicolas <[email protected]>wrote: > > > > > > > Hi, > > > I've got a problem with my Android app. It doesn't show test ad and I > > don't understand why. > > > Here is my java code: > > > package org.ifies.android; > > > import android.app.Activity; > > import android.graphics.Color; > > import android.os.Bundle; > > import android.widget.TableLayout; > > import android.widget.TableRow; > > import android.widget.TextView; > > import com.admob.android.ads.AdManager; > > import com.admob.android.ads.AdView; > > > public class AdmobExample extends Activity{ > > private TextView example_message; > > private AdView example_adview; > > > �...@override > > public void onCreate(Bundle savedInstanceState) { > > super.onCreate(savedInstanceState); > > this.setContentView(R.layout.main); > > > example_adview = (AdView) findViewById(R.id.ad); > > example_adview.setVisibility(AdView.VISIBLE); > > > example_message = (TextView) findViewById(R.id.example_message); > > example_message.setVisibility(TextView.VISIBLE); > > // example_message.setText("This is an example of AdMob for > > Android"); > > > } > > } > > > Here my xml layout > > > <LinearLayout > > xmlns:android="http://schemas.android.com/apk/res/android" > > xmlns:app="http://schemas.android.com/apk/res/org.ifies.android" > > android:orientation="vertical" > > android:layout_width="fill_parent" > > android:layout_height="fill_parent" > > android:layout_gravity="bottom"> > > > <TextView > > android:id="@+id/example_message" > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" > > android:text="TextView" > > android:layout_weight="1" /> > > > <com.admob.android.ads.AdView > > android:id="@+id/ad" > > android:visibility="gone" > > android:layout_width="fill_parent" > > android:layout_height="wrap_content" > > android:layout_alignParentBottom="true" > > app:backgroundColor="#FFFFFF" > > app:textColor="#000000" > > app:keywords="Android game" > > > app:testing="true" > > /> > > > </LinearLayout> > > > Here is the AndroidManifest.xml > > > <?xml version="1.0" encoding="utf-8"?> > > <manifest xmlns:android="http://schemas.android.com/apk/res/android" > > package="org.ifies.android" > > android:versionCode="1" > > android:versionName="1.0"> > > <application android:icon="@drawable/icon" android:label="@string/ > > app_name"> > > <activity android:name=".AdmobExample" > > android:label="@string/app_name"> > > <intent-filter> > > <action android:name="android.intent.action.MAIN" /> > > <category > > android:name="android.intent.category.LAUNCHER" /> > > </intent-filter> > > </activity> > > <meta-data android:value="a14adf472974adb" > > android:name="Test" /> > > </application> > > <uses-sdk android:minSdkVersion="2" /> > > <uses-permission android:name="android.permission.INTERNET" /> > > > </manifest> > > > And here is the logcat when app starts > > > 10-21 17:57:25.064: INFO/AdMob SDK(722): The user ID is null > > 10-21 17:57:25.124: DEBUG/AdMob SDK(722): Publisher ID read from > > AndroidManifest.xml is null > > 10-21 17:57:25.144: ERROR/AdMob SDK(722): Could not read > > ADMOB_PUBLISHER_ID meta-data from AndroidManifest.xml. > > 10-21 17:57:25.144: ERROR/AdMob SDK(722): > > java.lang.NullPointerException > > 10-21 17:57:25.144: ERROR/AdMob SDK(722): at > > com.admob.android.ads.AdManager.getPublisherId(AdManager.java:157) > > 10-21 17:57:25.144: ERROR/AdMob SDK(722): at > > com.admob.android.ads.AdRequester.buildParamString(AdRequester.java: > > 184) > > 10-21 17:57:25.144: ERROR/AdMob SDK(722): at > > com.admob.android.ads.AdRequester.requestAd(AdRequester.java:67) > > 10-21 17:57:25.144: ERROR/AdMob SDK(722): at > > com.admob.android.ads.AdView$1.run(AdView.java:317) > > 10-21 17:57:25.244: WARN/AdMob SDK(722): Could not get ad from AdMob > > servers. > > 10-21 17:57:25.244: WARN/AdMob SDK(722): > > java.lang.IllegalStateException: Publisher ID is not set! To serve > > ads you must set your publisher ID assigned fromwww.admob.com. > > Either add it to AndroidManifest.xml under the <application> tag or > > call AdManager.setPublisherId(). > > 10-21 17:57:25.244: WARN/AdMob SDK(722): at > > com.admob.android.ads.AdRequester.buildParamString(AdRequester.java: > > 188) > > 10-21 17:57:25.244: WARN/AdMob SDK(722): at > > com.admob.android.ads.AdRequester.requestAd(AdRequester.java:67) > > 10-21 17:57:25.244: WARN/AdMob SDK(722): at > > com.admob.android.ads.AdView$1.run(AdView.java:317) > > 10-21 17:57:25.264: INFO/AdMob SDK(722): Server replied that no ads > > are available (141ms) > > > I attach a picture from my admob acount settingIs. > > > I'm developing with Eclipse, Android SDK 1.5 under Kubuntu. > > > Can anyone help me please? > > > Thanks > > -- > Writing code is one of few things > that teaches me I don't know everything. > > http://www.fuligin.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

