Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Android Studio with Cocos2d-x

I work as an android programmer for just under a year now, and I just started to learn about android game development. The framework I choose to work with is Cocos2d-x.

I have seen guides and tutorials on how to use Cocos2d-x with eclipse, but I'd really like to know if it's possible to be used with Android Studio.

From what I've read, it is now possible to build NDK projects with gradle in Android Studio, which is good news. Nevertheless, I have yet to find any information about C++ programming using Android Studio. Eclipse uses the CDC ( https://www.eclipse.org/cdt/ ) plugin to achieve this.

Is there anything similar to be used with Android Studio? I have found some C/C++ enabling plugins for the IntelliJ Platform, but they were no longer updated.

Has anyone else tried this before? Did it work? Can you provide a step-by-step guide, for a newbie like me, who's dealing with this kind of problems for the first time?

Thank you for you time,

haxm

like image 225
georgej Avatar asked Mar 01 '14 09:03

georgej


People also ask

What programming language does Cocos2d use?

Cocos2D suits companies that decide to build games and interactive apps that are 2D, developed with the C++ programming language, JavaScript, C# and Lua, and can be played on both Android and iOS mobile technologies, as well as across all the main operating systems (Windows, Mac, Linux).

Is Cocos2d cross platform?

Cocos2d is a free software framework. It can be used to build games, apps and other cross platform GUI based interactive programs.

Does Cocos2d support Python?

Cocos2d is reliable and mature open source software framework that is used to build 2D games, apps and other cross-platform GUI-based interactive programs. It is written in Python using pyglet library.


2 Answers

Android Studio currently isn't well set-up for native programming. While the build system supports the NDK, there's no editor support for C++ files (it's not as if it won't work, but the IDE won't give you any editing assistance), and neither is there any debugging support. JetBrains has announced that they're working on new C++ support for IntelliJ, and this is something we're looking at for Android Studio, but it's not on the roadmap yet.

like image 157
Scott Barta Avatar answered Oct 20 '22 19:10

Scott Barta


Recent version of cocos2dx v3 (from github for example) have proj.android-studio project

At this moment I have no success to build it but maybe in future it will be fixed

like image 45
CAMOBAP Avatar answered Oct 20 '22 20:10

CAMOBAP