레이블이 cocos2d-x error인 게시물을 표시합니다. 모든 게시물 표시
레이블이 cocos2d-x error인 게시물을 표시합니다. 모든 게시물 표시

2016년 11월 22일 화요일

Cocos2d-x android back button issue after admob popup webview

Cocos2d-x로 게임을 개발하는중인데
배너광고를 달았는데 그 광고를 터치했을때 광고내용이 나옵니다.
그 이후에 문제가 생겼는데, back 버튼을 누르면 그냥 앱이 나가지는 문제가 발생하였습니다.

그래서 무슨문제인가 찾아봤더니
http://discuss.cocos2d-x.org/t/clicking-back-button-after-clicking-admob-ad-closes-app/17964

액티비티에 focus가 풀려서 그런것이더군요.
코드는 아래와 같이 해결!

if (this.getCurrentFocus() != Cocos2dxGLSurfaceView.getInstance()) { Cocos2dxGLSurfaceView.getInstance().requestFocus(); }

이 코드를 광고가 닫히는 이벤트에 넣으면 알맞게 잘 동작합니다.
I hope this help!

Cocos2d-x 에 iOS 배너광고 삽입시 "_OBJC_CLASS_$_GCController", referenced from: ... 에러

정확한 에러는
Undefined symbols for architecture x86_64:
  "_GCControllerDidConnectNotification", referenced from:
      -[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2d iOS.a(CCController-iOS.o)
  "_GCControllerDidDisconnectNotification", referenced from:
      -[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2d iOS.a(CCController-iOS.o)
  "_OBJC_CLASS_$_GCController", referenced from:
      objc-class-ref in libcocos2d iOS.a(CCController-iOS.o)
     (maybe you meant: _OBJC_CLASS_$_GCControllerConnectionEventHandler)
ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Build Phases > Link Binary With Libraries 에 
MediaPlayer.framework
GameController.framework 를 추가해주면 해결됨


2016년 10월 27일 목요일

cocos2d-x "_iconv", referenced from: error

cocos2d-x "_iconv", referenced from:

이 에러는 제가 iOS 포팅 중에 Frameworks 폴더에 있는 링크가 깨져있는 파일들을 지우고
빌드해봤는데 에러가 나서 뭐가 문제일까 하고 찾아봤습니다.

http://discuss.cocos2d-x.org/t/-iconv-linker-error-help-resolved/27941

답은
Build Settings -> Other Linker Flags에
-liconv 를 추가해주시면 됩니다.

2016년 9월 24일 토요일

Cocos2d-x, Error : Assert failed: reference count should be greater than 0

Fatal signal 11 (SIGSEGV)
D/cocos2d-x debug info: Assert failed: reference count should be greater than 0
E/cocos2d-x assert:
/Users/pineoc/Desktop/Game/proj.android-studio/../cocos2d/cocos/./base/CCRef.cpp function:retain line:89

현재 진행 중인 프로젝트에서 이러한 에러가 나오고 있다.

해당 파일에 들어가서 내용을 보면
void Ref::retain()
{
    CCASSERT(_referenceCount > 0, "reference count should be greater than 0");
    ++_referenceCount;
}

레퍼런스 카운트에 대한 문제인 것 같은데, 이 문제는 처음보는 문제라
분석을 해봐야 겠다.

----------------

현재 주 테스트 기기는 Dell Venue 7 인데
갤럭시 계열 기기는에서는 문제 없이 잘 돌아가는데, 유독 Dell Venue에서만 문제가 발생.
메모리 또는 태블릿이라 문제가 있는 것인지 추측해봤지만
메모리쪽은 모바일폰이랑 태블릿이랑 같아서 문제가 되지 않는것 같다.
단순히 성능이나 안드로이드 OS쪽 문제도 아닌 것 같은데 조금 더 분석이 필요한 것 같다.

----------------

로직을 살펴봤는데 아무래도 JniHelper, JNI를 사용하는 함수에서 문제가 있는 것 같다.
NDK쪽을 활용하는 JniHelper 클래스도 확인해보고 Thread Safe문제도 있는지 확인해봤지만
그 쪽 문제는 아닌 것 같다.

----------------
해당 문제를 없애기 위해서 여러가지 다 해봤는데
AndroidManifest.xml 설정부터 내부 로직까지 수정해봤으나 오류는 계속되었다.
JniHelper를 이용해서 함수를 부르는데에 문제가 있는 것 같아서 NDK쪽 문제인가해서
계속 찾아보았는데

테스트 기기가 x86 프로세서...
지금까지 NDK 빌드를 armeabi 버전으로만 빌드한것이 문제.
그래서 Application.mk에
APP_ABI := armeabi x86으로 수정해주고
빌드를 진행, 실행해봤더니 문제해결.

코드에도 문제가 있었을 수 있지만,
핵심은 프로세서 종류문제였다.

해결방법은 간단하게

APP_ABI := armeabi x86
을 추가해주면 끝.

2016년 4월 18일 월요일

libpng error: CgBI: unhandled critical chunk

* Environment
Cocos2d-x 3.10 + Xcode 7.3

* Error
"libpng error: CgBI: unhandled critical chunk"


* Solution
Build Settings -> Compress PNG files - Packaging -> Remove Text Metadata From PNG
set "Yes" to "No" (default is "Yes")

I hope you can save time.

Cocos2d-x The operation couldn't be completed Error - Solved


Problem post: http://pineoc.blogspot.kr/2016/04/cocos2d-x-operation-couldnt-be.html


This problem caused by resources folder.

like this screenshot.


In this situation,
I add Resources folder to my project.
"create folder references"



How to Fix

Do not add Resources folder using "Create folder references".
Add Resources folder using "Create groups" and add folders in Resources.

Like this image



My directory tree



This is my solution of this error.

I hope you will save time

2016년 4월 15일 금요일

cocos2d-x The operation couldn't be completed Error

Cocos2d-x "The operation couldn't be completed" Error occurred on iOS porting


*My develop Environment

OS: Mac
Xcode : 7.3 version
Cocos2d-x : 3.10


*Problem

Error occurred picture.



The operation couldn't be completed (LaunchServicesError error 0.)

In my situation,
Error occurred that Resources file directory added using "Create folder references".

If add Resource directory using "Create groups",
Error occurred "Possible missing file."

*Try

- Try1
1. Xcode project, Product -> Clean
2. Simulator, Simulator-> Reset content and settings
3. Run
->Not Work.

- Try2
1. Check log "~/Library/Logs/CoreSimulator/CoreSimulator.log"
2. Can find this text


Apr 15 14:21:14  CoreSimulatorService[954] <Error>: Could not register service com.apple.coreservices.lsuseractivity.simulatorsupport: Failed to lookup com.apple.coreservices.lsuseractivity.simulatorsupport: 0x44e

Apr 15 15:15:30  com.apple.dt.Xcode[2667] <Error>: Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=MissingBundleIdentifier, ErrorDescription=Bundle at path /Users/moon1000_mac_mini/Library/Developer/CoreSimulator/Devices$


Apr 15 15:27:01  com.apple.dt.Xcode[2667] <Error>: Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=MissingBundleIdentifier, ErrorDescription=Bundle at path /Users/moon1000_mac_mini/Library/Developer/CoreSimulator/Devices$

I think error key code is, MissingBundleIdentifier
Also

"Failed to lookup com.apple.coreservices.lsuseractivity.simulatorsupport"

can be key code.
google it, result of first doc.
http://stackoverflow.com/questions/26396166/unable-to-run-app-in-simulator
Resources directory rename to "app_data"

3.Run
->Not work.(no error, but can not find image datas at running app)

- Try3
1. Xcode, Simulator, computer reboot
2. run
->Not work.(no error, but can not find image datas)

I will try next time...

I hope you can save time using this try.
(It can help to your project because some situations can be helped)


Solved Link: http://pineoc.blogspot.kr/2016/04/cocos2d-x-operation-couldnt-be_18.html


JIRA Plugin - ScriptRunner 소개 #2

관련 글 소개 #1:  https://pineoc.blogspot.com/2019/03/scriptrunner-1.html ScriptRunner 소개 #2 지난 글에서는 Behaviours를 보았고 다음 내용인 콘솔, 리스너 등을 ...