I have a game in LibGDX (working perfectly in iOS with Android Studio) but without ads.
I have followed too many tutorial to add Admob, but everything than I tried got the same result:
My build.gradle file:
dependencies {
//classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.3-SNAPSHOT'
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.2.1-SNAPSHOT'
}
(I have tried with both 2.3.3 and 2.2.1)
ext {
appName = "xxxxxx"
gdxVersion = '1.9.7'
roboVMVersion = '2.2.1-SNAPSHOT'
robopodsVersion = '2.2.1'
box2DLightsVersion = '1.4'
ashleyVersion = '1.7.0'
aiVersion = '1.8.0'
}
(I have also tested with gdxVersion 1.9.0)
And ios project dependencies
project(":ios") {
apply plugin: "java"
apply plugin: "robovm"
dependencies {
compile project(":core")
compile "com.mobidevelop.robovm:robovm-rt:$roboVMVersion"
compile "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"
compile "com.mobidevelop.robovm:robopods-google-mobile-ads-ios:$robopodsVersion"
}}
I have also added this to robovm.xml:
<frameworkPaths>
<path>libs</path>
</frameworkPaths>
<frameworks>
<framework>GoogleMobileAds</framework>
</frameworks>
Finally, I have added GoogleMobileAds.framework to my ios/build/libs folder
When I start to modify the IOSLauncher class by adding the BannerAdView, it throw the following error
public class IOSLauncher extends IOSApplication.Delegate {
private GADBannerView adview;
Error:
Error:(13, 13) error: cannot find symbol class GADBannerView
What am I doing wrong? Someone has had the same issue?
Thanks in advance
Pablo