Android Studio 2.2

Google 2016 IO announced - It will support CMAKE, NDK Build with debug , sounds interesting!

1 Like

Yes, it does! CMAKE is a good thing!

Just watched Google I/O. Bring it on!

Yep, i noticed it. But it is in preview 1 stage, and it says:

. We are not offering patches to ensure we do not disrupt your current stable configurations with our first 2.2 preview

But i can not find any information about supporting cmake in the studio home page.

Looks like there is a session tomorrow about the update; https://events.google.com/io2016/schedule?sid=912d2aeb-0bef-e511-a517-00155d5066d7#day2/912d2aeb-0bef-e511-a517-00155d5066d7

Note also that GCC is now deprecated and clang must be used.

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.