Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building with Phonegap Build #8

Open
Craig-Fisk opened this issue Nov 29, 2019 · 1 comment
Open

Error when building with Phonegap Build #8

Craig-Fisk opened this issue Nov 29, 2019 · 1 comment

Comments

@Craig-Fisk
Copy link

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="[email protected]">
      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>

@fax1ty
Copy link

fax1ty commented Feb 15, 2020

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants