Admob

AgeBlackItalia

Member
Licensed User
Longtime User
Decided to try out admob

And got this


Compiling code. 0.02

ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. 0.01
Generating R file. 0.00
Compiling generated Java code. Error
B4A line: 34
Activity.AddView(AdView1, 0dip, 0dip, 100%x, 50dip)
javac 1.6.0_26
src\age\tunnel\lightbulb\prod\main.java:241: cannot access com.google.ads.AdView
class file for com.google.ads.AdView not found
mostCurrent._activity.AddView((android.view.View)(mostCurrent._v7.getObject()),anywheresoftware.b4a.keywords.Common.DipToCurrent((int)(0)),anywheresoftware.b4a.keywords.Common.DipToCurrent((int)(0)),anywheresoftware.b4a.keywords.Common.PerXToCurrent((float)(100),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.DipToCurrent((int)(50)));
^
1 error


Have looked at all the other thread on the subject and I am lost.

I have :
Downloaded the latest sdk from google ( placed it in extra under android )
Installed the java and xml in libraries
enabled admob from the lib tab​

deleted it all and did it all again from scratch (a few times)

now i'm lost - any ideas ?
 

NJDude

Expert
Licensed User
Longtime User
Did you add these lines to the AndroidManifest? (you can use the Manifest Editor)
B4X:
AddApplicationText(<!-- *** For AdMob: manually added *** -->)
AddApplicationText(<activity android:name="com.google.ads.AdActivity")
AddApplicationText(android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|smallestScreenSize|screenSize"/>)

Also, the AdView have specific sizes or they will not show up, read more HERE
 
Last edited:
Upvote 0

Similar Threads

Top