I have installed the admob library and the google play services extra install to version 19.0.1 and upwards but keep getting this error when trying to compile.
Thanks Erel. I've just done that but am still getting the same error.
The error occurs when trying to generate the R file. My manifest is as below:
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
'AdMob
AddApplicationText(
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
)
'End of AdMob
'AdMob
AddApplicationText(
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
)
'End of AdMob
I'm going to have to release this with no ads at all to start with and will then try putting leadbolt ads on. I've tried following the admob tutorial and I can't get it to work. I keep running into the 9 patch malformed errors and then if I rename all the files to .png instead of .9.png I just get a black ad view and the ad fails to load.
It was, but then after looking at the referenced thread, I deleted that folder and then got the patch 9 png images error. I googled that problme and renamed all the *.9.png images to just *.png. I then got the app to comile and install but it fails to retrieve the ad. I have registered the ad and have tried using either my publisher id or the ad id but neither work.
'AdMob gubbins
AdView1.Initialize2("Ad", "ca-app-pub-123456789012/1234567890", AdView1.SIZE_SMART_BANNER) 'publisher id that you received from AdMob.
Dim ScreenHeight, pScreenWidth As Int
ScreenHeight = Activity.Height - 50dip
pScreenWidth=GetDeviceLayoutValues.Width
Activity.AddView(AdView1, 0dip, ScreenHeight, 100%x, 50dip) 'previously the height was 48dip. Now it is 50dip
AdView1.LoadAd 'loads an ad
'end of AdMob gubbins
but I suspect you've already got both in place.... I guess you're not new to Admob are you? They seem to be a bit more strict on new accounts and verifying them - but they may well have been when I first registered, but that was around 3 years ago for me now, if not more.
Looks like it may have been the wifi network I'm on blocking ad requests, I also switched to the smart banner size option, I wasn't using that before. I switched to my phone network and it seems to be working.
Really???? Oh, bad bug!!! Thanks! I'll fix it now. I'm going to alter a few thing like making the levels get harder quicker and the aliens look better with more variety. I'll post the source code on my site in a few days.
and your exploding bitmap for the users ship needs to be transparent - I think it's background is black. So when the planet is behind the ship and you explode it shows up on a black rectangle.