Skip to content

android build error on building apk #2260

Answered by rh101
arungowda09 asked this question in Q&A
Discussion options

You must be logged in to vote

If you're using libwebsockets, which is included in Cocos2d-x, then you'll need to copy it over to your project along with libuv.

For example, make a folder named "thirdparty" in the root of your project, so it would be {project_dir}/thirdparty.

Now copy websocket, uv, and cmake folders from the Cocso2d-x external folder, and put them in the {project_dir}/thirdparty that you created in your project. The cmake folder is required for the file named CocosExternalConfig.cmake, which is referenced by the websocket and uv cmake files.

To link these libraries to you project, open your {project_dir}/CMakeListst.txt, and modify it to look something like this:

if(NOT ANDROID)
    add_executable(${A…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@rh101
Comment options

rh101 Dec 9, 2024
Collaborator

@rh101
Comment options

rh101 Dec 10, 2024
Collaborator

@rh101
Comment options

rh101 Dec 10, 2024
Collaborator

Answer selected by arungowda09
@arungowda09
Comment options

@arungowda09
Comment options

Comment options

You must be logged in to vote
1 reply
@arungowda09
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants