I took sample Native-activity, adding google-play-services to get a game service point, but I get lot of errors that could not find gms classes:
E/GamesNativeSDK(31779): Exception in java/lang/ClassLoader.loadClass: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.ConnectionResult" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]].
E/GamesNativeSDK(31779): Exception in java/lang/ClassLoader.loadClass: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.GooglePlayServicesUtil" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]].
E/GamesNativeSDK(31779): Exception in java/lang/ClassLoader.loadClass: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.api.Api" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]].
....
The code section is like this:
gpg::AndroidInitialization::android_main(app_state);
plat_config_.SetActivity(app_state->activity->clazz);
gpg::GameServices::Builder my_builder;
my_builder.SetOnLog([this](gpg::LogLevel level, std::string const &msg) {
onLogCallback(level, msg);}, gpg::LogLevel::VERBOSE)
.SetOnAuthActionStarted([this](gpg::AuthOperation op) {
onAuthStarted(op);})
.SetOnAuthActionFinished([this](gpg::AuthOperation op, gpg::AuthStatus status) {
onAuthActionFinsihed(op, status);})
.SetOnMultiplayerInvitationEvent([this](gpg::MultiplayerEvent event, std::string match_id, gpg::MultiplayerInvitation invitation){
onMultiplayerInvitationEvent(event, match_id, invitation);});
LOGI("gfan: Pre-Create");
gpg_services_ = my_builder.Create(plat_config_);
LOGI("gfan: Creating the Services done");
LOCAL_MODULE := SimpleTriangle
LOCAL_SRC_FILES := main_entry.cpp game_engine.cpp game_helper.cpp gpg_helper.cpp
LOCAL_CFLAGS :=
LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv2
LOCAL_STATIC_LIBRARIES := cpufeatures android_native_app_glue ndk_helper gpg-1 gnustl-static
LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. $(NDK_MODULE_PATH)/gpg-cpp-sdk/android/include
#hard-fp setting
ifneq ($(filter %armeabi-v7a,$(TARGET_ARCH_ABI)),)
#For now, only armeabi-v7a is supported for hard-fp
#adding compiler/linker flags specifying hard float ABI for user code and math library
LOCAL_CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1
LOCAL_LDLIBS += -lm_hard
ifeq (,$(filter -fuse-ld=mcld,$(APP_LDFLAGS) $(LOCAL_LDFLAGS)))
#Supressing warn-mismatch warnings
LOCAL_LDFLAGS += -Wl,--no-warn-mismatch
endif
endif
include $(BUILD_SHARED_LIBRARY)
$(call import-module,android/ndk_helper)
$(call import-module,gpg-cpp-sdk/android)
$(call import-module,android/native_app_glue)