Open Craig-Fisk opened 4 years ago
Hey guys i'm getting the following build error when trying to use your plugin with Phonegap Build service:
Error - A plugin you are using requires a preference: ANDROID_PLAY_SERVICES_GAMES_VERSION
I've tried to add this preference to my config.xml, below is my example config.xml:
<?xml version="1.0" encoding="UTF-8" ?> <widget xmlns = "http://www.w3.org/ns/widgets" xmlns:gap = "http://phonegap.com/ns/1.0" xmlns:android = "http://schemas.android.com/apk/res/android" id = "APPID" versionCode = "42" version = "1.6.2" > <!-- versionCode is optional and Android only --> <name>My App Name</name> <description> My Description </description> <author href="http://www.craigfisk.co.uk" email="fisk.craig@gmail.com"> Craig Fisk </author> <platform name="android" /> <preference name="android-targetSdkVersion" value="28" /> <preference name="" value="" /> <preference name="DefaultVolumeStream" value="media" /> <preference name="DisallowOverscroll" value="true" /> <preference name="EnableWebGL" value="true" /> <preference name="StatusBarOverlaysWebView" value="false" /> <preference name="FullScreen" value="true" /> <preference name="KeepRunning" value="false" /> <preference name="Orientation" value="portrait" /> <preference name="Suppresses3DTouchGesture" value="true" /> <preference name="SuppressesLongPressGesture" value="true" /> <preference name="WindowSize" value="fullscreen" /> <preference name="EnableViewportScale" value="true" /> <plugin name="cordova-plugin-statusbar" /> <plugin name="cocoon-plugin-ads-android-admob" /> <gap:plugin name="cordova-plugin-play-games-services" source="npm"> <param name="APP_ID" value="MYAPPID" /> <param name="ANDROID_PLAY_SERVICES_GAMES_VERSION" value="+" /> <param name="ANDROID_PLAY_SERVICES_PLUS_VERSION" value="+" /> </gap:plugin> <config-file platform="android" parent="/manifest/application" mode="merge"> <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="MYAPPID" /> </config-file> <platform name="android"> <icon src="res/android/ldpi.png" density="ldpi" /> <icon src="res/android/mdpi.png" density="mdpi" /> <icon src="res/android/hdpi.png" density="hdpi" /> <icon src="res/android/xhdpi.png" density="xhdpi" /> <icon src="res/android/xxhdpi.png" density="xxhdpi" /> <icon src="res/android/xxxhdpi.png" density="xxxhdpi" /> </platform> </widget>
@artberri Please add package.json to the root of the project where the current location will be specified. Without it, the plugin cannot be installed on new versions of Cordova
package.json
Hey guys i'm getting the following build error when trying to use your plugin with Phonegap Build service:
Error - A plugin you are using requires a preference: ANDROID_PLAY_SERVICES_GAMES_VERSION
I've tried to add this preference to my config.xml, below is my example config.xml: