I have the new 15 version android sdk and the new admob sdk. On the layout preview of xmls file the banner show google ads however when I put it on my phone. In the banner it tells me to “You must have AdActivity declared in the AndroidManifest.xml with configChanges”Which I think i declared.
here are my codes:
xmnls files
<com.google.ads.AdView android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="xxxxxxxxxxxc"
ads:adSize="BANNER"
ads:loadAdOnCreate="true"/>
main Activity:
public class MainAct extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Look up the AdView as a resource and load a request.
AdView adView = (AdView)this.findViewById(R.id.adView);
adView.loadAd(new AdRequest());
}
}
manifest
<activity android:name="com.google.ads.AdActivity"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|fontScale">
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
I have follow what is on http://code.google.com/mobile/ads/docs/android/fundamentals.html
thank you
It was the android taget. I had on 8.when it need to been on 13