Reputation: 29
I'm new with cocos2d-x-3.17, and i want to start a new android game project, and i prefer developt it in Visual Studio 15/17. I tried to do some search on forum, but unfortunately got me confused.
I already did install coco2d-x-3.17, i used https://docs.cocos2d-x.org/cocos2d-x/en/editors_and_tools/cocosCLTool.html this to make new project, after i create new project folders comes up, and i code inside proj.win32 where i found a sln file. I've succesfull in creating simple windows game project using win32 all works fine.
but How can i do this with android game project? did i make it right on installation or i miss something?
Upvotes: 1
Views: 1465
Reputation: 20140
I've succeeded in creating a simple windows game project using win32 all works fine.
Now You want to port/deploy your game on Android.
What is your native code build-system?
You can find this in your gradle.properties
file that is inside proj.android
folder.
By default cocos2d-x 3.17
using ndk-build but cocos2d-x 3.17.1
using cmake.
If ndk-build
, native code will be compiled by Android.mk. Add all your .cpp
file in Android.mk
(find Android.mk inside jni folder) under LOCAL_SRC_FILES
tag.
If cmake
, native code will be compiled by CMakeLists.txt. Add your .cpp
and .h
file in CMakeLists.txt
(find CMakeLists.txt inside your project) under list of cross-platforms source files and header files.
Now you can build apk by using Cocos command-line tool or Android Studio.
Upvotes: 2