cocos2d-x-3.9 using Android studio build an fresh new game application run crash

Hello, i using cocos2d-x-3.9 to create a new game.
After create i using Android studio to open and build the game, i install the apk file to my smart phone. When i run the application it crashed.
With the message “Sorry: The application libcocos2dx (process com.mygame.test) has stoped unexpectly. Please try again.”
I don’t add any new code, just build, if it run it should be show the HelloWorld.png that is cocos2dx.
I run on the simulation i look on the logcat i see the below message

11-25 18:11:25.968 3812-3812/com.mygame.test W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x40015560)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: FATAL EXCEPTION: main
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: java.lang.UnsatisfiedLinkError: Couldn’t load cocos2dcpp: findLibrary returned null
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at java.lang.Runtime.loadLibrary(Runtime.java:429)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at java.lang.System.loadLibrary(System.java:554)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at org.cocos2dx.lib.Cocos2dxActivity.onLoadNativeLibraries(Cocos2dxActivity.java:288)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:303)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at android.app.ActivityThread.access$1500(ActivityThread.java:117)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at android.os.Looper.loop(Looper.java:123)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:3683)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:507)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
11-25 18:11:25.988 3812-3812/com.mygame.test E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)

I don’t know to fixed. Does any one know how to solve the problem.

Try to run on an armeabi-v7a based emulator and see whether it happens again.

I try to run on an armeabi-v7a based emulator and see the error message at the run windows as below.

eglMakeCurrent failed
eglMakeCurrent failed
distrib/android-emugl//host/libs/Translator/GLES_V2//GLESv2Imp.cpp:glUseProgram:2073 error 0x501
distrib/android-emugl//host/libs/Translator/GLES_V2//GLESv2Imp.cpp:glUseProgram:2073 error 0x501
Error making draw context current
draw: Could not use program error=0x501
draw: Could not bind GL_ARRAY_BUFFER error=0x502

I open the HelloWorldScene.cpp file and make the code error by change the line
auto layer = HelloWorld::create() ;
to
auto layer = HelloWorld::create() ggg

and build again i don’t see the build error.
Gradle build finished in 34s 765ms

It mean it not compile the .cpp code.
I open the file Android.mk it already declare the path to .cpp file

LOCAL_MODULE_FILENAME := libcocos2dcpp

LOCAL_SRC_FILES := hellocpp/main.cpp
…/…/…/Classes/AppDelegate.cpp
…/…/…/Classes/HelloWorldScene.cpp

LOCAL_C_INCLUDES := $(LOCAL_PATH)/…/…/…/Classes

Have any one know how to solve the problem?

I am also getting java.lang.UnsatisfiedLinkError: Couldn’t load cocos2dcpp: findLibrary returned null
looks like Android Studio is not creating the .so file and then not loading it in app.

Any help regarding this ?