I have written a little game on JavaFX and ported it successfully to Android. Now I want to include some Google Ads. For this I created a PlatformService and AndroidPlatformProvider like in this example shown. I'm using the Gluon plugin for Netbeans
I added this to my build.gradle file:
repositories {
def androidHome = System.getenv("ANDROID_HOME")
maven { url "$androidHome/extras/android/m2repository/" }
maven { url "$androidHome/extras/google/m2repository/"}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.android.gms:play-services-ads:7.5.0'
}
And in my AndroidManifest.xml I added:
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
And their I get my next error when I try to build the apk-file
:processAndroidResources UP-TO-DATE C:\Users\Martin\Documents\NetBeansProjects\Trio\build\javafxports\tmp\android\AndroidManifest.xml:27: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version'). :processAndroidAndroidResources FAILED
I searched a bit and I found that I should include the google-play-services_lib as a library but I dont know how. Its my first time working with gradle
In the Android SDK Manager I installed the newest Play Services and the Repository