[Solved] Android NDK: MyGame_shared depends on undefined modules: android_native_app_glue

Hello,

So I downloaded 3.14.1, created a brand new project, copied all my game classes over from 3.10 (and rewrote them to deal with all the changes) but I can’t build android.

I’m using:

cocos compile -p android --android-studio

Android Studio 2.3. SDK Platform-Tool 25.0.4, SDK Tools 26.0.0.

Note, I couldn’t get it to even start building without following the solution here: http://stackoverflow.com/questions/42552341/why-cocos-compile-p-android-gives-the-android-command-is-no-longer-available

Using console based on this change:
(https://github.com/cocos2d/cocos2d-console/pull/410)

Do I really have to downgrade to 25.2.3?

Thanks

Thanks! This allowed me to make some progress. Now from Android Studio everything builds but I get this:

 java.lang.UnsatisfiedLinkError: Couldn't load MyGame from loader dalvik.system.PathClassLoader...etc

“Unfortunately … has stopped”.

The Cocos2d tagline:
“if u love pain, you’ll love this engine”

3 Likes

I fixed this by cloning the latest commit in github and doing a merge with my android studio folder. Basically updated it as best I could.

Now I’m at yet another set of new errors:

Error:(52, 45) error: package com.android.vending.expansion.zipfile does not exist


Error:(53, 25) error: cannot find symbol class SDKBox…

etc.