Android Studio 2.2

There is a pull request for it: https://github.com/cocos2d/cocos2d-x/pull/15676

Guys please help me, I have been stuck here for so many days…
I am trying to reset the ball in bubble shooter game. Using this->getChildren() gives error as ‘type cast’: cannot convert from ‘cocos2d::Vector<cocos2d::Node *>’ to ‘cocos2d::Array *’


void BaseScene::resetBallsState()
{
Array * balls = (Array*) this->getChildren();
for (int j=0; jcount(); j++)
{
Node * a = (Node*)balls->objectAtIndex(j);
if(a->getTag() >= Tag_Ball_Start)
{
Ball * currentBall = (Ball*)balls->objectAtIndex(j);
currentBall->setUserObject(String::create(“empty”));
currentBall->hasparent = false;
}
}
}


Node::getChildren() returns cocos2d::Vector<Node*>&. You can not convert it to Array. And please create a new thread of it. Thanks.

Thanks, I have created a new thread. Can you tell me what is the possible way to accomplish this task?

What’s the link of new thread?

Here it is: How to use "this->getChildren"

Can someone tell me will cmake work together with gradle? So we can it’s features? (http://discuss.cocos2d-x.org/t/adding-gradle-support/17289/34?u=piotrros). Is there some ETA? I hit the wall again :smiley: This time with Firebase :smiley: I wanted to migrate to recently announced version, but there’s no way to use it without gradle (AAR’s and also some plugin doing extra work).

Regarding CMAKE, it looks just additional line in gradle , which says instead of Android.mk use CMAKE( list of classes to be compiled in project) so all integrations still going thru Android.

thru Android Studio? So things I’ve mentioned will work :smiley: ?

I haven’t tried it, but i think it can work with latest Android Studio version. The author of the PR comes from google.

Please try it! We need that! :slight_smile: If it’ll work out will it work with precompiled libs? Will it be in next cocos release? :slight_smile:

Yep, i am trying it. Just preparing the developing context.

On my Windows 8.1 machine, I was able to apply this patch and import the default “cocos new” project into Android Studio, and build and run it successfully (it prompted me to install CMake, LLDB, and update HAXM, all of which succeeded)… however no breakpoints hit. I tried both “app” and “app_native” debug configurations. I tried on both emulator and physical Nexus 6 running each Android 23. I tried breakpoints in both Java and C++ code.

Is it necessary to have Android N Developer Preview installed? I think the problem might be that when I click “Edit Configurations…”->“Debugger”, the “Symbol Directories” list is blank. I think LLDB does not know how to find the C++ symbols? Or maybe the CMake build script is using GCC still? I don’t know.

@Ajas could you please report it on the PR(the link above)? Then the author will know it. Thanks.

How’s the progress :smiley: ?

@piotrros You can follow the PR, all progress is there.

Nice. Fingers crossed!

Has anyone managed to hit the C++ breakpoints yet? :blush:

I have not gotten breakpoints to hit yet, however if I pause the cocos2dx app running and go into the LLDB pane in the debugger window I can type:

p *Director::getInstance()

(which is gdb debugger-speak for “print out the full description of the Director::getInstance() object”)

and it outputs a fully-valid description with names of all the fields and values correct. So the Debugger “works” however I think there is just some disconnect between the Android Studio front end and the lldbserver in setting a breakpoint.

What did you mean?

I can also hit the breakpoint too.