Android Cocos2dx构建问题

Android Cocos2dx构建问题,android,c++,android-ndk,cocos2d-x-3.x,Android,C++,Android Ndk,Cocos2d X 3.x,我有最新版本的Cocos2dx,它是v3.12和最新的ndk r12b在MacOSX上。 我尝试了无数次为android平台构建我的项目,但我一直遇到一个“R_ARM_THM_CALL中的重新定位溢出”错误。 而且这些库最终不会链接。 如何修复此错误?我是否需要cocos2dx或ndk的早期版本 请帮忙 以下是整个错误消息: /Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/co

我有最新版本的Cocos2dx,它是v3.12和最新的ndk r12b在MacOSX上。 我尝试了无数次为android平台构建我的项目,但我一直遇到一个“R_ARM_THM_CALL中的重新定位溢出”错误。 而且这些库最终不会链接。 如何修复此错误?我是否需要cocos2dx或ndk的早期版本

请帮忙

以下是整个错误消息:

/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCNode.cpp:903: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/Android/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/regex.h:2109: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/Android/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/regex.h:2109: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/Android/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/regex.h:515: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/Android/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/regex.h:515: error: relocation overflow in R_ARM_THM_CALL
[x86] SharedLibrary  : libMyGame.so
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./platform/CCGLView.cpp:44: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/CCAffineTransform.cpp:73: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/CCAffineTransform.cpp:74: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Mat4.cpp:968: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Mat4.cpp:974: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Quaternion.cpp:26: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Vec4.cpp:306: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Vec4.cpp:307: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Vec4.cpp:308: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Vec4.cpp:309: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Vec4.cpp:310: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Vec4.cpp:311: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCGLProgramState.cpp:46: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTextureCache.cpp:634: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCFrameBuffer.cpp:36: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCCamera.cpp:42: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/Android/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/iostream:74: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/external/bullet/LinearMath/btQuickprof.cpp:21: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/external/bullet/LinearMath/btQuickprof.cpp:433: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/external/bullet/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp:623: error: relocation overflow in R_ARM_THM_CALL
/Volumes/Android/buildbot/src/android/ndk-r12-release/toolchain/gcc/gcc-4.9/libstdc++-v3/libsupc++/eh_globals.cc:117: error: relocation overflow in R_ARM_THM_CALL
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/arm-linux-androideabi/bits/gthr-default.h:778: error: relocation overflow in R_ARM_THM_CALL
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/ext/concurrence.h:219: error: relocation overflow in R_ARM_THM_CALL
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/ext/atomicity.h:49: error: relocation overflow in R_ARM_THM_CALL
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/bits/basic_string.h:249: error: relocation overflow in R_ARM_THM_CALL
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/ext/atomicity.h:49: error: relocation overflow in R_ARM_THM_CALL
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/bits/basic_string.h:249: error: relocation overflow in R_ARM_THM_CALL
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/ext/atomicity.h:49: error: relocation overflow in R_ARM_THM_CALL
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/bits/basic_string.h:249: error: relocation overflow in R_ARM_THM_CALL
/Volumes/Android/buildbot/src/android/ndk-r12-release/toolchain/gcc/gcc-4.9/libstdc++-v3/src/c++11/system_error.cc:65: error: relocation overflow in R_ARM_THM_CALL
/Volumes/Android/buildbot/src/android/ndk-r12-release/toolchain/gcc/gcc-4.9/libstdc++-v3/src/c++11/system_error.cc:66: error: relocation overflow in R_ARM_THM_CALL
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/ext/atomicity.h:49: error: relocation overflow in R_ARM_THM_CALL
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/bits/basic_string.h:249: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:33: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:33: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:33: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:33: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:34: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:34: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:34: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:34: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:36: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:63: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:63: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:64: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:64: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:65: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:65: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:66: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:66: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:67: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:67: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:68: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:68: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:69: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:69: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:70: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:70: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:71: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:71: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:74: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:74: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:75: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:75: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:76: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:76: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:77: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:77: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:81: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:81: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:85: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:85: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:97: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:97: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:102: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:102: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:107: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:107: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:116: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontAtlasCache.cpp:36: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontAtlasCache.cpp:36: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontAtlasCache.cpp:36: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontAtlasCache.cpp:36: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontFreeType.cpp:50: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontFreeType.cpp:50: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontFreeType.cpp:50: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontFreeType.cpp:50: error: relocation overflow in R_ARM_THM_CALL
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCVertexAttribBinding.cpp:46: error: relocation overflow in R_ARM_THM_CALL
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
尝试NDK r11c:

还要确保您的Android.mk中有以下行:

LOCAL\u ARM\u模式:=ARM


这对我很有效(我在NDK r12b中也有同样的错误)。希望这有帮助

当您使用NDKr12时,它是一个bug

APP_ABI:=armeabi

应用程序.mk文件中。是在cocos2d项目的github中打开的问题,也是cocos2d-x开发人员在NDK项目的github上打开的问题。
但是,解决方案呢?你可以将你的应用程序_ABIarmeabi更改为armeabi-v7a,并编译你的项目,而不会出现上述错误。

这里有一些信息要检查,我已经检查过了,没有任何效果:(什么cocos2d-x版本?这仍然是NDKr14b中的一个bug。