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
1
vote
1 answer

How to use CustomEventData in Button component Cocos Creator 3.5.0 Typescript

In the Button component we have CustomEventData. In my understanding the purpose it to send extra parameter when user tap the button. I have tried to use it like this: use_powerUp(par: string){ console.log("MapScreenManager::use_powerUp() = ",…
noobsee
  • 806
  • 15
  • 29
1
vote
2 answers

how do i create a cocos2d particle effect in cocos2d android 1?

I'm using the android version of cocos2d located here: https://github.com/ZhouWeikuan/cocos2d I'm an iPhone guy checking out android who already has familiarity with cocos2d iPhone. Ideally i would be able to create the particle from a plist file in…
nickthedude
  • 4,925
  • 10
  • 36
  • 51
1
vote
2 answers

Cocos2D Touch HELP

I`m new to cocos2d library, I worked before with libgdx and pure openGL. How can I handle a touch event in Cocos2d for Android?
Felix
  • 159
  • 2
  • 3
  • 13
1
vote
0 answers

Integrate Android library into cocos2D for Android release (Failed to invoke JavaScriptJavaBridge_callStaticMethod)

I am trying to integrate an android library (.aar) into cocos2D Android release. Though I can import the android library, I am not able to call the class function in the library. This is how I call the Android function from the cocos2D javascript…
Kuldeep Bhimte
  • 961
  • 1
  • 10
  • 25
1
vote
1 answer

Unable to load the frame cocos2d for Android

I am trying to draw one sprite from atlas.. I created with Zwoptex the atlas and the plist file. put the two files in the assest folder.. In the code I create new GameScene class and try to load it.. //Return the ShareFrameCache object. …
user552120
1
vote
1 answer

Call JNI from cocos2d-x to Android is not triggered in Release Mode

I have a problem with call function from cocos2d-x (C++) to the Android Native (Java) in release mode. In cocos2d-x, I have a function: logInToGamePlayServices, which will call a function in Java side start login to the Game Play Service. It's…
1
vote
0 answers

cocos2d causes app to drop all touch and volume control events if the phone is locked while the app is starting

I extend Cocos2dxActivity, and in the onCreate, I am showing a DialogFragment with some GDPR stuff in it. The only lifecycle events that my custom DialogFragment overrides is onSaveInstanceState() and onCreateDialog(). My dialog does have a…
lbenedetto
  • 2,022
  • 1
  • 21
  • 39
1
vote
0 answers

android Fatal signal 11 (SIGSEGV), code 1, fault addr 0x9 in tid 27173

I am new to cocos creator. I am working on a game and when i press home button and get back to app. then app is crashed. shows this error while debugging. android Fatal signal 11 (SIGSEGV), code 1, fault addr 0x9 in tid 27173 (GLThread 1836) Already…
Khemraj Sharma
  • 57,232
  • 27
  • 203
  • 212
1
vote
2 answers

Are you sure your NDK_MODULE_PATH variable is properly defined?

After creating an initial cocos2d Lua project, but get the following bug error. Error info Android NDK: /Users/beck/Documents/Cocos2d-x/Hello_CocosLua/frameworks/runtime-src/proj.android-studio/app/jni/Android.mk: Cannot find module with tag…
Beckon
  • 128
  • 2
  • 15
1
vote
2 answers

Error - couldn't find "libMyGame.so"

I'am tring to run MyGame cocos's program. But when I am tring to run it on android studio get an error : java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file…
I.Mac
  • 289
  • 3
  • 17
1
vote
0 answers

Cocos2dx-v3. Does “preloadEffect in SimpleAudioEngine” cache duplicates?

Will calling SimpleAudioEngine::getInstance()->preloadEffect("sound.mp3"); multiple times lead to duplicating cache? and lead to taking up more memory?
Joon. P
  • 2,238
  • 7
  • 26
  • 53
1
vote
1 answer

How to use Map with string and int in Cocos2dx-v3 C++?

http://www.cocos2d-x.org/wiki/Map%3CKV%3E This link only explains with Map types. If I want to use something like this: Map should I just stick to std::map? Will I have to do some extra memory management…
Joon. P
  • 2,238
  • 7
  • 26
  • 53
1
vote
1 answer

NDKr12 LOCAL_SRC_FILES points to a missing file.a in path ../arm64-v8a/file.a

my game is using cocos2dx 2.2.6 I have upgrade the NDK to the the NDKr12 beta1 and try to build my project then I get so many errors at the NdkModule folder and NDK complain that it doesn't found the output file in Ndk Module…
Dania Delbani
  • 816
  • 1
  • 11
  • 27
1
vote
0 answers

cocos2d c++ Collision between edge physics bodies

I'm working on a game with cocos2d, need to detect collision between two PhysicsEdgeBody. I've created an EventListener for contact and added it to the layer i'm working on, PhysicsContact and Collisions between two PhysicsBody or PhysicsBody and…
1
vote
3 answers

Building a Cocos2d-x project with android : "package org.apache.http does not exist"

I'm trying to build my cocos project to android. At first, I ran the following command: cocos run -s {my_project_path} -p android And I got errors of packages and symbols that weren't found, here is the first error: error: package org.apache.http…
Ben
  • 31
  • 2