Android studio sdkbox iap error: undefined modules: android_native_app_glue

Things just aren’t going my way these last few days! After installing and setting up iap, everything works fine on xcode/ios. But then I open Android Studio and Gradle project sync fails with error:

Error:(686, 0) Android NDK: Module MyGame_shared depends on undefined modules: android_native_app_glue

Do I have to move to earlier version of tools or sdk or ndk? I’m not sure what to do.

My android.mk has everything as far as I can tell:

LOCAL_CPPFLAGS := -DSDKBOX_ENABLED
LOCAL_LDLIBS := -landroid \
-llog
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../Classes
LOCAL_WHOLE_STATIC_LIBRARIES := PluginAdMob \
sdkbox \
PluginIAP \
android_native_app_glue

Do you know which android ndk are you using? This error means android_native_app_glue is missing in your version of android NDK

If possible please compile with ndk 10e to make sure compatibility

I have NDK 14.1 showing in Android Studio, I will attempt to downgrade. Thanks Nite, I’ll report back what happens.

Yeahhhh it’s working! Downgraded to 10e and everything compiles and IAP works on Android!

Great, we’re working on NDK 14 compatibility issue.