Questions tagged [cocos2d-android]

JAVA version for Android development. Cocos2D is an open source framework for building 2D games and graphical applications. Cocos2D-Android and Cocos2D-Android-1 are the two active projects.

Cocos2D for Android is a Java based open source framework for building 2D games and graphical applications. Cocos2D-Android and Cocos2D-Android-1 are the two active projects. The latter is a branch of the former and seems more active.

Both Cocos2D for Android engines are based on the API design of Cocos2D for iPhone, but they are not compatible with each other (Java vs Objective-C).

For more information on the other Cocos2D game engines, see the and tag descriptions.

It is recommended to use the following tags appropriately:

  • Use the tag on questions referring to the Objective-C based framework
  • Use the tag on questions referring to the C++ based cross-platform framework
  • Use the tag on questions referring to the JavaScript based framework
  • Use the tag on questions referring to the Java based frameworks
  • Use the tag on questions referring to the Python based framework
  • Don't use any of the above tags together in the same question, unless your question refers to more than one Cocos2D engine. For example, if you ask "How to port from Cocos2d-iPhone to Cocos2D-x?" you should include both and tags.
398 questions
0
votes
1 answer

cocos2d, how to see log messages on android studio?

I'am trying to log by "CCLOG" but I don't see the log messages on logcat of android studio. how can i see log messages on android studio? there is another log function?
I.Mac
  • 289
  • 3
  • 17
0
votes
1 answer

error when updated libpng for cocos2d-x

i have problem when replace fixed libpng. i used cocos2d1.0.1-x-0.13.0-beta/ndkr8 Compile++ thumb : cocos2dx_static <= CCFileUtils.cpp Compile++ thumb : cocos2dx_static <= CCGL.cpp Compile++ thumb : cocos2dx_static <=…
Lão Tà
  • 78
  • 1
  • 9
0
votes
1 answer

JNI NewStringUTF crashes in android

A/art(30231): art/runtime/check_jni.cc:65] string: 'LevelScore11� art/runtime/check_jni.cc:65] ' art/runtime/check_jni.cc:65] in call to NewStringUTF A/art(16684): art/runtime/check_jni.cc:65] from void…
0
votes
1 answer

How to detect orientation change in Android using Javascript(Cocos2d-JS)

I've been playing around with mobile game dev using Cocos Creator, which is built on top of Cocos2d-JS. The question is, how can we detect a change in orientation in the game app in Android using Javascript? The 'window' and 'document' element is…
evkwan
  • 693
  • 3
  • 9
  • 17
0
votes
0 answers

Cocos2d-x Where will be the best place to cache sprites?

I want to cache some sprite frames while the user sees a loading page. When should I implement the following three things? display loading screen cache sprites hide loading screen The choices are: FirstScene : init FirstScene : onEnter FirstScene…
Joon. P
  • 2,238
  • 7
  • 26
  • 53
0
votes
1 answer

How much space should I leave out for a bottom Admob banner?

I left out about 100(don't know the unit) in height at the bottom of the screen for the admob banner, which will be added at the end of the project. For iphone 6, the height of the admob banner is about 100. But, when I move to ipad, this height is…
Joon. P
  • 2,238
  • 7
  • 26
  • 53
0
votes
1 answer

Cocos2d How do I switch scenes

So I have mainScene and I have LogoScene, I am wondering If i can make logoscene show a logo, then transition to mainscene. here is what i have import org.cocos2d.layers.CCLayer; import org.cocos2d.layers.CCScene; import…
0
votes
0 answers

setting up cocos2d CCBitmapFontAtlas for arabic font android

i am stuck at getting an arabic fnt and png file(bitmap font style ) which i have created with Hiero bitmap font tool to work with my cocos2d android game. i am replacing this line "CCBitmapFontAtlas selectgame = CCBitmapFontAtlas.bitmapFontAtlas (…
0
votes
1 answer

Cannot create new project Cocos 2d-x on cmd

Extract Cocos 2d-x rar: C:\Users\lethi\ On cmd: C:|Users\lethi>cocos new snackgame -p lethien.hoang.snackgames -l cpp c-d C:\Users\lethi\Desktop Show result off: 'cocos' is not recognized as an internal or external command, operable probram or batch…
J. Joe
  • 383
  • 6
  • 26
0
votes
0 answers

Cant create cocos2d project in eclipse

So I am fairly sure everything is all configured right. So far I have ran a cocos2d project for windows through visual studio. Now I am trying to do it for android through eclipse with android tools. So far I have created the project folder with…
J.Doe
  • 1,502
  • 13
  • 47
0
votes
2 answers

Permission Error When Specifying NDK Root in Mac

I'm trying to run the setup.py of cocos2dx. I have downloaded the sdk, ndk and apache ant. But whenever I try to link it to the necessary paths, I get this error. I'm not really sure what this means. How can I get permission? Thanks.
cessmestreet
  • 2,298
  • 3
  • 22
  • 42
0
votes
1 answer

cocos2d-x Run parent action from child

I try to write a simple game using cocos2d-x library. I created class (named Letter) to spawn sprite with random letter as a label and add a listener because I want to catch touch events. I've a function: listener->onTouchEnded = [=](cocos2d::Touch*…
esio
  • 1,592
  • 3
  • 17
  • 30
0
votes
1 answer

An error of compile APK when i use Cocos2dx

this new project can run in win32,but not compile APK,how can i solove it ?ths enter image description hereenter image description here ps: i hava another question is i cann't find the error in the logs,where it is ?
wei li
  • 1
  • 1
0
votes
0 answers

Android app crashing with Cocos2dx-js

my android crashes sometimes for some of the users which i am able to see google developer console. Below is the crash log for the entire crash which i extracted out of google break pad. The crash clearly says that in the following…
Siddhant Jain
  • 489
  • 5
  • 26
0
votes
0 answers

string.match works but string.find failed in cocos lua on Android when using Chinese

I use string.find('中国', '中') and string.match('中国', '中') to search in cocos lua. It's weird that they both worked on Win32, however, string.find('中国', '中') failed on Android. I read the source code of lua.…
Sam
  • 964
  • 3
  • 11
  • 24