0

I'm implementing Google_play_services to Android (C++) game using Visual Studio, VisualGDB and Android NDK. I Managed to do initialization:

extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved)
    {
        Logger::log("JNI_OnLOAD");
        gpg::AndroidInitialization::JNI_OnLoad(vm);
        return JNI_VERSION_1_4;
    }

but I can't add google play services libs as shown here

https://developers.google.com/games/services/cpp/gettingStartedAndroid

because google_play_services since version 22 doesn't contain

"/extras/google/google_play_services/libproject",

Instead there are multiple libraries in

"/extras/google/m2repository/com/google/android/gms"

I already tried to download version 22 and just copy google-play-services.jar file which i found to the libs directory of my project. But it gives these errors. I assume i need to import newest version. But how to do this?

This are the errors I get

output with errors

Kaes
  • 1
  • 3
  • Each subdirectory of `extras/google/m2repository/com/google/android/gms` contains a bunch of versions of that library. Pick the version you want, and build with the corresponding .aar file. – Michael May 23 '17 at 13:45
  • how can we add .aar to project? – Kaes May 23 '17 at 14:00
  • Depends on how you're building. If you're using Gradle, then see e.g. https://stackoverflow.com/questions/16682847/how-to-manually-include-external-aar-package-using-new-gradle-android-build-syst If you're using some other build system, then I don't know, but googling _" import aar"_ might help. – Michael May 23 '17 at 14:03

0 Answers0