eclipse - Mobile advertise is not showed in android apps (AdMob) -


I'm trying to show ads in the Android app. For this, I am trying to follow the instructions given in this link.

All the instructions are done by me completely. But the addition is not shown here is my Android layout XML file.

   & Lt; / RelativeLayout & gt;  

and the mainstream code is given in the following

  the public class increases main activity activity {@ override creates protected zeros (bundles saved instansstate) ) {Super.onCreate (savedInstanceState); SetContentView (R.layout.activity_main); } @ Override Public Boolean On Crate Option Menu (Menu Menu) {// Enhancing Menu; It adds the item to the Action Bar if it exists GetMenuInflater (). Flow (R. menu activation_men, menu); Back true; }}  

Finally my manifest file is given in the following.

  & lt ;? Xml version = "1.0" encoding = "UTF-8" & gt; & Lt; Manifest xmlns: android = "http://schemas.android.com/apk/res/android" package = "com.example.androidproject" android: versionCode = "1" Android: versionName = "1.0" & gt; & Lt; Use-sdk android: minSdkVersion = "8" Android: targetSdkVersion = "17" /> & Lt; Usage-permission Android: name = "android.permission.INTERNET" /> & Lt; Usage-permission Android: name = "android.permission.ACCESS_NETWORK_STATE" /> & Lt; Android Android: allowBackup = "true" android: icon = "@draubable / IC_Luncher" Android: label = "@ string / app_name" Android: Theme = "@ Style / Aaptim" & gt; & Lt; Activity Android: name = "com.example.androidproject.MainActivity" android: label = "@ string / app_name" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; & Lt; Activity Android: name = "com.google.ads.AdActivity" Android: configChanges = "keyboard | keyboardHidden | Orientation | Screen Layout | uiMode | Screenshots | Small Screen Size" / & gt; & Lt; / Application & gt; & Lt; / Reveal & gt;  

But not showing the pair. Here's a point, I'm testing this app in eclipse emulator. Does it create a problem? Please help me .

  & lt; Relative layout xmlns: android = "http://schemas.android.com/ apk / res / android" xmlns: ads = "http://schemas.android.com/apk/lib/com.google.ads" xmlns: Tools = "http://schemas.android.com/tools" Android: Layout_width = "match_parent" Android: layout_height = "match_parent" tools: reference = "main activity" & gt; & Lt; TextView android: Layout_width = "Wrap_content" Android: Layout_height = "Wrap_content" Android: layout_centerHorizontal = "true" Android: layout_centerVertical = "true" android: text = "@ string / hello_world" / & gt; & Lt; RelativeLayout android: id = "@ + id / mainLayout" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: layout_alignParentBottom = "true" & gt; & Lt; com.google.ads.AdView android: id = "@ + id / ad" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" ad: adSize = "SMART_BANNER" ad: adUnitId = "@ string / addID" ad : LoadAdOnCreate = "true" advertising: testDevices = "TEST_EMULATOR, TEST_DEVICE_ID_GOES_HERE" /> & Lt; / RelativeLayout & gt; & Lt; / RelativeLayout & gt;  

Use it in your code. Working for me.


Comments