How to speed up cocos2d-x build with prebuilt lib

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: http://docs.sdkbox.com/en/plugins/admob/v3-cpp/#manual-integration-for-android

i was already follow this steps .but i dont know whats the problem .
hear is my android.mk 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 libMyGame.so 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.

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

First:


HEADER_SEARCH_PATHS contains this for me, adjust for your setup.

/Volumes/GitHub/cocos2d-x/ 
/Volumes/GitHub/cocos2d-x/cocos 
/Volumes/GitHub/cocos2d-x/cocos/base 
/Volumes/GitHub/cocos2d-x/cocos/physics 
/Volumes/GitHub/cocos2d-x/cocos/math 
/Volumes/GitHub/cocos2d-x/cocos/2d 
/Volumes/GitHub/cocos2d-x/cocos/ui 
/Volumes/GitHub/cocos2d-x/cocos/network 
/Volumes/GitHub/cocos2d-x/cocos/audio/include 
/Volumes/GitHub/cocos2d-x/cocos/editor-support 
/Volumes/GitHub/cocos2d-x/extensions 
/Volumes/GitHub/cocos2d-x/external 
/Volumes/GitHub/cocos2d-x/external/chipmunk/include/chipmunk

Second:


HEADER_SEARCH_PATHS contains this for me, adjust for your setup.

/Volumes/GitHub/cocos2d-x/cocos/platform/ios 
/Volumes/GitHub/cocos2d-x/cocos/platform/ios/Simulation 
$(inherited)

LIBRARY_SEARCH_PATHS contains this for me, adjust for your setup

/Volumes/GitHub/cocos2d-x/prebuilt/ios

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 : libcocos2dlua.so
/Volumes/workspace/cocos2d-x-3.11.1/tools/simulator/frameworks/runtime-src/proj.android/…/…/…/…/…//tools/simulator/libsimulator/proj.android/…/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/proj.android/…/…/…/…/…//tools/simulator/libsimulator/proj.android/…/lib/ProjectConfig/ProjectConfig.cpp:26: error: relocation overflow in R_ARM_THM_CALL
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi/libcocos2dlua.so] Error 1
make: Leaving directory `/Volumes/workspace/cocos2d-x-3.11.1/tools/simulator/frameworks/runtime-src/proj.android’
Error running command, return code: 2.
Error running command, return code: 14.

Please help me…

Hi…
This post help me to solve above problem:

Thanks

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!!

@nite

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 proj.android 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.

Thanks.