cocos2dx3.2 Android Configuration

Source: Internet
Author: User

cocos2dx3.2 Android configuration is much simpler than the previous version, especially the Android.mk, because in 3.2 it has already added the required packages, the use of what the package can be directly removed the corresponding comments can be

Android is now very difficult to download, two days ago found a great God has helped us to fix, can go to his network before the download

Http://jingyan.baidu.com/article/ff42efa91d7abcc19e2202f0.html

Android Development Environment Configuration Online tutorial has been a lot, not much to say, their own Baidu

Now start to configure cocos2dx3.2 Android, there are also great gods have done a tutorial, can directly refer to

Http://www.cnblogs.com/ShadowLoki/p/3679929.html

Now some parameter settings in the project

Project into eclipse (I'm using an Android official own development environment)

1.0 Right-click Project->properties

  

Click Builders

  

Click New to create your own compilation mode

  

  

Main

Location: Fill in the path where you have to Ndk-builder.cmd

Working Directory Select your current project

Now you can modify your android.mk and application.mk.

ANDROID.MK also don't need to modify, just add some of your own write the class to go in it

  

Local_path: = $ (Call my-dir) include $ (clear_vars) $ ( callImport-add-path,$ (Local_path)/. /.. /cocos2d) $ ( callImport-add-path,$ (Local_path)/. /.. /cocos2d/external) $ ( callImport-add-path,$ (Local_path)/. /.. /cocos2d/Cocos) Local_module:=Cocos2dcpp_sharedlocal_module_filename:=Libcocos2dcpplocal_src_files:= hellocpp/main.cpp ./.. /classes/AppDelegate.cpp ./.. /classes/Helloworldscene.cpplocal_c_includes:= $ (local_path)/... /.. /classeslocal_whole_static_libraries:=cocos2dx_staticlocal_whole_static_libraries+=cocosdenshion_static# local_whole_static_libraries+=box2d_static# local_whole_static_libraries+=cocosbuilder_static# local_whole_static_libraries+=spine_static# local_whole_static_libraries+=cocostudio_static# local_whole_static_libraries+=cocos_network_static# local_whole_static_libraries+=Cocos_extension_staticinclude $ (build_shared_library) $ ( callImport-module,.) $ ( callImport-module,audio/Android) # $ ( callImport-module,box2d) # $ ( callImport-module,editor-support/cocosbuilder) # $ ( callImport-module,editor-support/Spine) # $ ( callImport-module,editor-support/Cocostudio) # $ ( callImport-module,network) # $ ( callImport-module,extensions)

Application.mk

Sometimes I do not pay attention to write some not C + + standard library, such as some format error

You can add a app_cflags + =-wno-error=format-security, which ignores formatting errors

Originally APPLICATION.MK is not modified what, but our project is not a person to write; because the cocos2dx3.2 version is compatible with the previous version, some colleagues have not yet transitioned, and some have adopted the 2.2 version of the class and method when writing the code.

This is an auto-generated version of APPLICATION.MK 3.2.

App_stl: = c + +_staticndk_toolchain_version=clangapp_cppflags:=-frtti-dcc_enable_chipmunk_ integration=1-std=c++11-fsigned-Charapp_ldflags:=-latomicapp_debug:= $ (Strip $ ( Ndk_debug)) ifeq ($ (app_debug),1)  + =-dcocos2d_debug=1  app_optim:= DEBUG Else + =-dndebug  app_optim:= releaseendif   

You can change the app_stl:=c++_static to app_stl:=gnustl_static when you're not compiling it and pointing to the cocos2dx3.2 library.

This is my current application.mk file.

App_stl: = gnustl_staticndk_toolchain_version=clangapp_cppflags:=-frtti-dcc_enable_chipmunk_ integration=1-std=c++11-fsigned-Charapp_ldflags:=-+ =-wno-error=format-  Securityapp_debug:= $ (strip $ (ndk_debug)) ifeq ($ (app_debug),1)  + =-dcocos2d_debug=1   app_optim:= Debugelse  + =-dndebug  app_optim:= Releaseendif

  

cocos2dx3.2 Android Configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.