Using prebuilt libs

In previous versions i used cocos gen-templates and cocos new -t binary. But now it seems like this way became depricated :

Is there a way to use prebuilt libs now (especialy on windows) or should i generate templates using the previous versions/copy-paste compiled empty project ?

Check this out: Android Studio support

Thanks ! And what about win32 build ? I found some ways to use precompiled libs in visual studio, but running exe resulted in some strange errors. By the way i couldn’t find any solution on how to prebuild anroid libs (since there is no android command now).

cocos gen-libs -p android -m release

cocos gen-libs -p win32 -m release

A few examples. You can even nest:

cocos gen-libs -p ios -p android -p win32 -m release

After cocos gen-libs -p android -m release i get Ant (Eclipse project) is not supported from Android SDK Tools 25.3.0. error. Do i need to use previus versions of Android SDK ? And how to use windows gererated libraries after compilation (from prebuilt/win32)?

@slackmoehrle prebuilt libs is not just work. There are many problems with them.
I’ve found solutions and created some threads and issues on github(not only me) with description about these problems. I’m just waiting for fix(if its possible).
So, currently I’m advising not to use prebuild and wait for 5-10 min depending on your processor power to compile all cocos2d-x source code.

Depending upon Cocos2d-x version we no longer support Eclipse. If you want to use Studio you can.

For Win32, you need to add the prebuilts to Visual Studio and then changed your Header and Include search paths to reflect where it needs to search.

As @anon98020523 said, prebuilts on Android are awkward. This is being worked on in both engineering and documentation. On iOS and win32 they work just fine.

Thanks a lot ! :slight_smile:

I’m having trouble running with the prebuilt library, using VS 2015 and cocos2d-x 3.16. I’ve followed the instructions here, but every time I try to run my project, I get a message that it’s out of date, and then an error that libcocos2d_2015.dll is missing an entry point for lws_get_protocol.

I’m trying to recreate the libraries, hoping I’m doing it right. I run
cocos gen-libs -c -m release --vc 2015 -p win32

In 3.14.1 prebuilt libraries works on ios, android and vs2015 with their default compiler. Maybe something is wrong in ur solution settings.

very possible, thanks. I’m creating a test project, and will try it there, before trying it out on my whole project.