Prebuilt libraries setup the definitive guide and game project kickstart for cocos2d-x 3.13.1

how can i do that if i am using Android studio?

@crittergorge
instead of copying it in my every project is there any way to link this with CCENGINE folder?

It should be:
cd yourprojectdir
ln -s cocos_engine_installdir/cocos/platform/android yourprojectdir/android

Sorry to ask, with prebuilt libs like this, can we use sdkbox?

Yes. When sdkbox was being developed we tested this a lot. In fact that was the only way I tested. While others used source

@crittergorge i can’t get past step 21.
can you help me out.
i am attaching screenshots.

Great tutorial! Thanks for sharing!

Are you sure your NDK_MODULE_PATH variable is properly defined?

Normally means your android setup is not correct. You probably have to get back to step 0, ----- cocos2d-x engine setup

Supposedly you have downloaded…

and try to set android ndk correctly. But that’s my guess… try 23. cocos compile, it ndk is not setup well compilation works but there will be no .so library in /lib because ndk-build failed silently…

you’re welcome.

i have setup correctly. i have even did it again. But same issue.

@crittergorge
Do i need to do these steps? as i’ll be working on Android studio projects.

Skip them, you can always set them up after you’ve go android studio working. Just follow the android studio part for initial setup, then check the forum, there’s another thread more detailed about it.

1 Like

ran this command : cocos gen-libs -m release -c -p ios

got this error

** BUILD FAILED **

The following build commands failed:
CompileC build/cocos2d_libs.build/Release-iphonesimulator/libcocos2d\ iOS.build/Objects-normal/i386/DetourPathQueue.o /Volumes/DATA/cocos2d-x/cocos2d-x/external/recast/DetourCrowd/DetourPathQueue.cpp normal i386 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error running command, return code: 65.

my system :
Mac OSX 10.13.3
cocos2d-x-3.17
Cocos Console 2.3
xCode 9.2

Any help?

It works for me, using the v3 branch.

It used to work for me as well. I changed my mac and need to reinstall cocos setup.
one thing i observed is that on my new mac i installed python 3 few days ago. Now when i ran library build command it prompted an error that python2 in not install. then i installed python 2.7 as well. Now i have both python3 and python2, i wonder if it has something to do with this error?

It probably does. Which is default when you do python —version?

its Python 2.7.14

I’d double check your setup, something is out of place. Tell me how yo obtained Cocos2d-x. .zip from our website or cloning our GitHub repo? What steps have you done so far?

1 Like

I cloned it.

git clone <our repo>
cd <where ever you cloned the repo>
git submodule update --init
git submodule update
./download-deps.py
./setup.py 
source ~/.bash_profile

i followed these steps

ok, those are my instructions. Everything should work.

Can you try the steps again and post your output for me. Let’s get you up and running.