Please update us whether it succeeded or not.
Hi,
I deleted everything that had to with AdMob and B4A, then followed the tutorial line by line:
http://www.b4x.com/forum/basic4andr...-admob-tutorial-add-ads-your-application.html
A few things:
The GoogleAdMobAdsSdkAndroid-x.x.x.jar library is now version 4.0.4. You reference 4.0.2.
What seems to be a spelling mistake; the files no longer have "Android" appended to the name. I noticed the XML file in your AdMod.zip file no longer has "Android" appended either. I had to take the "Android" off the jar file name or upon opening B4A, I would get an error referencing GoogleAdMobAdsSDK.xml saying jar file not found. The tutorial still has "Android" appended to the names in step 3.
I get the same error when compiling:
Compiling code. 0.02
Using existing readonly AndroidManifest.xml
Generating R file. 0.00
Compiling generated Java code. Error
B4A line: 31
Activity.AddView(AdView1, 0dip, 0dip, 320dip, 50dip)
javac 1.6.0_21
src\canalrun\apps\aslalpha\main.java:202: cannot access com.google.ads.AdView
class file for com.google.ads.AdView not found
mostCurrent._activity.AddView((android.view.View)(mostCurrent._adview1.getObject()),anywheresoftware.b4a.keywords.Common.DipToCurrent((int)(0)),anywheresoftware.b4a.keywords.Common.DipToCurrent((int)(0)),anywheresoftware.b4a.keywords.Common.DipToCurrent((int)(320)),anywheresoftware.b4a.keywords.Common.DipToCurrent((int)(50)));
Here is my B4A "other libraries" directory:
Directory of C:\Users\Barry\Android Dev\Basic4Android\AdLibs
04/17/2011 03:27 PM <DIR> .
04/17/2011 03:27 PM <DIR> ..
03/23/2011 09:11 AM 3,355 AdMob.jar
03/23/2011 09:26 AM 6,991 AdMob.xml
03/24/2011 03:28 PM 159,463 GoogleAdMobAdsSdk.jar
01/12/2011 11:55 AM 163 GoogleAdMobAdsSDK.xml
4 File(s) 169,972 bytes
2 Dir(s) 383,215,050,752 bytes free
My code and XML file look almost exactly like the tutorial.
Thanks,
Barry.