Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

Where should ./gpg-cpp-sdk directory be located? #28

Closed

Description

@S3riousSam

The How-to run a sample says that the developper must download the Google Play Game Services C++ SDK and unzip it to the ./gpg-cpp-sdk directory.

I'm sorry that I cannot figure out where that folder should go...

Thanks for clarifying this instruction for me.

Activity

  1. claywilkinson commented on Jan 29, 2016

    @claywilkinson
    Contributor

    The instructions for a command line build are in README.build - it says that NDK_MODULE_PATH should be set to the location that the SDK was expanded. I suggest in Common/gpg-sdk.

    You can also try to use the experimental Android Studio support to build with Gradle: http://tools.android.com/tech-docs/android-ndk-preview

  2. S3riousSam commented on Feb 1, 2016

    @S3riousSam
    Author

    "NDK_MODULE_PATH to the location of the Play Games cpp libraries."... I understand this refers to the root of the cpp-android-basic-samples zip content, right?

  3. claywilkinson commented on Feb 1, 2016

    @claywilkinson
    Contributor

    NDK_MODULE_PATH should be the directory that the C++ SDK was unzipped into.

  4. S3riousSam commented on Feb 1, 2016

    @S3riousSam
    Author

    In build_sample.sh, "${ANDROID_HOME}/tools/android"... "android" refers to android.bat of the [Android SDK]\tools folder, right? (the build.sh scripts complains that I have ANDROID_HOME wrong (ERROR: F:\Android\ADT\SDK\tools\android does not exist), but android.bat exists there...

  5. claywilkinson commented on Feb 1, 2016

    @claywilkinson
    Contributor

    Might be a windows vs. non-windows issue. can you try copying android.bat to android and see if still works? I'll look into later today for a more permanent solution.

  6. S3riousSam commented on Feb 1, 2016

    @S3riousSam
    Author

    Likely Windows... so I guess it was not tested on Windows?

    I had to make these changes to make the script building (however, it looks like it still does not produce any lib nor apk yet):

    declare -r required_paths=( \
      "${ANDROID_HOME}/tools" \
    
    declare -r android_tool="${ANDROID_HOME}/tools/android.bat"
    

    output from build.sh:

    Building...
    /bin/sh: mount : command not found
    /bin/sh: tr : command not found
    /bin/sh: awk : command not found

  7. claywilkinson commented on Feb 1, 2016

    @claywilkinson
    Contributor

    Ugh - it does look the script is not windows friendly. I'll take a look as soon as I can.

  8. claywilkinson commented on Feb 1, 2016

    @claywilkinson
    Contributor

    Did you get this working?

  9. S3riousSam commented on Feb 1, 2016

    @S3riousSam
    Author

    Using Android Studio, yes. That was not an issue building it (after MANY guesses & try), but the sample application was crashing with UnsatisfiedLinkError exception (library not found)... which led me to try all kind of workarounds. At last I had to modify ButtonClickerNativeActivity.java to make it work...

  10. gguuss commented on Feb 6, 2016

    @gguuss
    Contributor

    The following worked for me:

    Build all samples on Windows using Gradle

    1. Unzip the Play Games Services to the sample folder. The gpg-cpp-sdk folder should be in the same folder containing the samples-android folder.

    2. Install Android Studio

    3. Set the path to the Android SDK

      set ANDROID_HOME=C:\Users\AppData\Local\Android\sdk

    4. Add the SDK to your path

      set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools

    5. Set the path to the Android NDK

      set ANDROID_NDK_HOME=C:\Users\Desktop\android-ndk-r10e

    6. (Optional) On some versions of Windows it is helpful to map the samples folder to a shortened path.

      subst C: G:

    7. Execute the build script

      G:
      gradlew.bat sync
      gradlew.bat assemble

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions