How to speed up cocos2d-x build with prebuilt lib

How to speed up cocos2d-x build with prebuilt lib
0.0 0


i was set up sdkbox .it was work fine before use prebuilt lib . but now it gatting error


I’d post a topic under the SDKBOX category.


now i get this error …i dont know what to do


@pabitrapadhy @nite can you take a look at this last post from @chiragkevadiya

Is this SDKBOX related?


yes this is related with sdkbox but if i use library from source it works fine .but in prebuilt its not work


ah, yes, I bet things are configured wrong. IIRC there were changes that needed to be made if you were going to use the pre-built libraries.


Go through these steps:


i was already follow this steps .but i dont know whats the problem .
hear is my is this any problem in this?


I used
cocos gen-libs -c -p android --app-abi x86 -p win32 --vs 2015 -m debug
command to create precompiled libraries. A folder appeared named win32 in the prebuilt directory. Now how can use this with the proj.sln solution?


Hi all, I’m just trying to use prebuilt in a tricky way. I’m trying to build via android studio with experimental graddle ndk support. I managed to build and link with cocos prebuilts (generated using gen-libs) but when I launch the game I get a crash in getEnv (JavaVm seems to be null). Any idea?


Hmm, maybe check your apk first make sure the .so .dex files are all there.


Yes my classes.dex and are there


Hello all,

I wanted to build my sample project with prebuilt libs.
I’m using cocos2dx 3.11.1, when i want to change the library path in Xcode i can only see below image with $(inherited).
Should i add paths manually…? or whether i’m doing wrong somewhere…?

Please help me out guys…


Yes add the paths manual. You need to add paths as part of your project and then your target. I only use the pre-builts now.


Thanks for reply.

I added library paths manually, but still getting error like ‘cocos2d.h’ file not found’.

And whether i need to add Target Dependencies??, but not getting any dependency to add.

[SOLVED] Attaching the debugger to Cocos2dx library in Xcode

You need to do it a bit differently, at least this is what I do.


HEADER_SEARCH_PATHS contains this for me, adjust for your setup.



HEADER_SEARCH_PATHS contains this for me, adjust for your setup.


LIBRARY_SEARCH_PATHS contains this for me, adjust for your setup



Thanks slackmoehrle it works…

For android i’m trying to generate prebuilt libs i run the command “cocos gen-libs -p android”.
I’m using NDK android-ndk-r10c
But getting below error logs

[armeabi] StaticLibrary : libcocos2dandroid.a
[armeabi] StaticLibrary : libcpufeatures.a
[armeabi] SharedLibrary :
/Volumes/workspace/cocos2d-x-3.11.1/tools/simulator/frameworks/runtime-src/…/…/…/…/…//tools/simulator/libsimulator/…/lib/ProjectConfig/ProjectConfig.cpp:24: error: relocation overflow in R_ARM_THM_CALL
/Volumes/workspace/cocos2d-x-3.11.1/tools/simulator/frameworks/runtime-src/…/…/…/…/…//tools/simulator/libsimulator/…/lib/ProjectConfig/ProjectConfig.cpp:26: error: relocation overflow in R_ARM_THM_CALL
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi/] Error 1
make: Leaving directory `/Volumes/workspace/cocos2d-x-3.11.1/tools/simulator/frameworks/runtime-src/’
Error running command, return code: 2.
Error running command, return code: 14.

Please help me…


This post help me to solve above problem:



Has anybody tried to use the pre-built libs with Android Studio?

If Yes, then can you please post the steps to set it up?

thanks in advance!!



I interested to use prebuilt with Android Studio too.

FYI, I’m using prebuilt library with cocos2d-js v3.8.1 and working fine.

But now i would like to use prebuilt library with Android Studio and gradle to add third party library which only support integration with Gradle or Maven.

I run command
cocos compile -p android --android-studio

It generated an apk.

Then i import the into Android Studio.
Project built with error
AppDelegate not found

Is there any solution to make Android Studio work with prebuilt library? Its really save a lot time.