1

I'am tring to run MyGame cocos's program.

But when I am tring to run it on android studio get an error :

 java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.cocos2dx.SimpleGame-1/base.apk"],nativeLibraryDirectories=[/data/app/org.cocos2dx.SimpleGame-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libMyGame.so" 

I read somewhere that before running the program on android studio i need to run the command from the game directory :

cocos compile -p android --android-studio

but then I am getting an error :

ANDROID_SDK_ROOT not defined. Please define it in your environment.

What i need to do? Thanks.

I.Mac
  • 289
  • 3
  • 17

2 Answers2

4

Find Setup.py (python script) from root folder of cocos2dx and run it . and give information of ANDROID_SDK - , NDK , ANT

FOR FURTHER INFORMATION FOLLOW THIS LINK COCOS2DX - ANDROID SETUP

ApDheeraj
  • 101
  • 7
0

Define ANDROID_SDK_ROOT in environment variable of your system.

Variable Name : ANDROID_SDK_ROOT
Variable Value : location of your sdk
Abhishek Aryan
  • 19,936
  • 8
  • 46
  • 65