Closed hamatani63 closed 8 years ago
I think you just need cocos run -p android
tks. I'll try it later.
I am trying to setup cocos2d-x and tried to build test using command python android-build.py -p 9 cpp-tests
where 9 is id of android platform id: 9 or "Google Inc.:Google APIs:23"
.
After building for several minutes, it exit with an error /Users/klodha/Developer/cocos2d-x-3.10/tests/cpp-tests/proj.android/../../../external/websockets/prebuilt/android/armeabi/libwebsockets.a(context.c.o):context.c:function libwebsocket_create_context: error: undefined reference to 'getdtablesize'
Any clue? thanks
@klodha I suggest you use cocos
command instead.
@minggo I actually tried compiling my own project using cocos first. But with that when I got same error, I was attempting every possible solution mentioned on forums, github and thus encountered same error while trying to build tests.
Below is complete log for default Hello World project compilation using cocos
. I really need to get it solved today. Really appreciate any help around this.
klodha-mac-Mini:hello-cocos klodha$ cocos compile -p android
Building mode: debug
Using Eclipse project : /Users/klodha/Study/hello-cocos/hello-cocos/frameworks/runtime-src/proj.android
Android platform not specified, searching a default one...
running: '/Users/klodha/Developer/android/sdk/tools/android update project -t android-15 -p /Users/klodha/Study/hello-cocos/hello-cocos/frameworks/runtime-src/proj.android'
Updated project.properties Updated local.properties Updated file /Users/klodha/Study/hello-cocos/hello-cocos/frameworks/runtime-src/proj.android/proguard-project.txt Android platform not specified, searching a default one... running: '/Users/klodha/Developer/android/sdk/tools/android update lib-project -p /Users/klodha/Study/hello-cocos/hello-cocos/frameworks/cocos2d-x/cocos/platform/android/java -t android-15'
Updated project.properties Updated local.properties Updated file /Users/klodha/Study/hello-cocos/hello-cocos/frameworks/cocos2d-x/cocos/platform/android/java/proguard-project.txt Building native... NDK build mode: debug running: '/Users/klodha/Developer/android/android-ndk-r11c/ndk-build -C /Users/klodha/Study/hello-cocos/hello-cocos/frameworks/runtime-src/proj.android -j4 NDK_MODULE_PATH=/Users/klodha/Study/hello-cocos/hello-cocos/frameworks/runtime-src/proj.android/../../cocos2d-x:/Users/klodha/Study/hello-cocos/hello-cocos/frameworks/runtime-src/proj.android/../../cocos2d-x/cocos:/Users/klodha/Study/hello-cocos/hello-cocos/frameworks/runtime-src/proj.android/../../cocos2d-x/external NDK_TOOLCHAIN_VERSION=4.9 NDK_DEBUG=1'
Android NDK: WARNING: APP_PLATFORM android-15 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml
Android NDK: WARNING: Unsupported source file extensions in /Users/klodha/Study/hello-cocos/hello-cocos/frameworks/runtime-src/proj.android/../../cocos2d-x/cocos/scripting/js-bindings/proj.android/Android.mk for module cocos2d_js_static
Android NDK: \
[armeabi] StaticLibrary : libjscocos2d.a
[armeabi] StaticLibrary : libcocos2d.a
[armeabi] StaticLibrary : liblocalstorage.a
[armeabi] StaticLibrary : libcocostudio.a
[armeabi] StaticLibrary : libcocosbuilder.a
[armeabi] StaticLibrary : libcocos3d.a
[armeabi] StaticLibrary : libspine.a
[armeabi] StaticLibrary : libui.a
[armeabi] StaticLibrary : libcocosdenshion.a
[armeabi] StaticLibrary : flatbuffers.a
[armeabi] StaticLibrary : libextension.a
[armeabi] StaticLibrary : libaudioengine.a
[armeabi] StaticLibrary : libbox2d.a
[armeabi] StaticLibrary : libnetwork.a
[armeabi] StaticLibrary : libcocos2dxinternal.a
[armeabi] StaticLibrary : librecast.a
[armeabi] StaticLibrary : libbullet.a
[armeabi] StaticLibrary : libjscocos2dandroid.a
[armeabi] StaticLibrary : libcocos2dandroid.a
[armeabi] StaticLibrary : libcpufeatures.a
[armeabi] Gdbserver : [arm-linux-androideabi-4.9] libs/armeabi/gdbserver
[armeabi] Gdbsetup : libs/armeabi/gdb.setup
[armeabi] SharedLibrary : libcocos2djs.so
/Users/klodha/Study/hello-cocos/hello-cocos/frameworks/runtime-src/proj.android/../../cocos2d-x/external/spidermonkey/prebuilt/android/armeabi/libjs_static.a(ExecutableAllocatorPosix.o):function JSC::ExecutableAllocator::determinePageSize(): error: undefined reference to '__page_size'
/Users/klodha/Study/hello-cocos/hello-cocos/frameworks/runtime-src/proj.android/../../cocos2d-x/external/websockets/prebuilt/android/armeabi/libwebsockets.a(context.c.o):context.c:function libwebsocket_create_context: error: undefined reference to 'getdtablesize'
collect2: error: ld returned 1 exit status
make: *\ [obj/local/armeabi/libcocos2djs.so] Error 1
Error running command, return code: 2.
I also posted about this today on cocos2d-x forums. Link for same is http://discuss.cocos2d-x.org/t/unable-to-compile-android-platform-from-terminal/28803
What's your cocos2d-x version? And how did you create the project? Did you have problem if building cocos2d-x tests shift by cocos2d-x?
Cocos2d-x version 3.10 (downloaded yesterday from cocos2d-x website). I created one project using cocos
command line (cocos new hello-cocos
). Then I faced same errors. So I downloaded cocos-studio, configured NDK, Android SDK path in preferences and created 1 project using that too (hello world template) and when I hit build, it worked fine. But in compile, it gave error with hint to check native build log. In log, it was showing same error.
On 22-Apr-2016, at 11:59 am, minggo notifications@github.com wrote:
What's your cocos2d-x version? And how did you create the project? Did you have problem if building cocos2d-x tests shift by cocos2d-x?
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/cocos2d/cocos2d-x/issues/15417#issuecomment-213283982
I apologize for my late reply.
I just tried cocos run -p android
and I got the same error.
I found a similar problem in stack overflow. Is the article related to our issue?
@hamatani63 It seems it is the same issue. Anyway, i always use ndk-r10c, and i suggest you use this version too.
I understand. tks.
@minggo / @hamatani63, thanks for updates. I checked stack overflow link and its seems 1st error is surely related to this. However, second error in libwebsocket (getdtablesize
) part seems different to me.
Though I am not a C++ developer, I find solution suggested in stack overflow link little confusing. I am trying to find download link for ndk-r10c for OS X, though unfortunately it will be another half gig download and going to be charged by ISP as out of my bandwidth quota now.
Is there any way to get it working with r11c? If so that will be really very helpful to me.
@klodha I will download r11c to have a try with latest code. You created an JS project, right?
@minggo yes, it was a JS project. I really appreciate your support over this issue.
@klodha You are welcome, but it will make me much time to download r11c too.
@minggo can understand. I will look forward for your findings & suggestion to resolve the issues.
@minggo / @klodha, I downloaded android-ndk-r10c-darwin-x86_64.bin. Then I use the ndk-r10c, both cocos run -p android
and cocos run -p android --android-studio
work.
I used ndk-r11c so far and it failed. So, it seems that this issue depends on the version of NDK.
When using r11c, i met the issue too, the error message is
/Users/minggo/SourceCode/test/MyJSGame/frameworks/runtime-src/proj.android/../../cocos2d-x/external/spidermonkey/prebuilt/android/armeabi/libjs_static.a(ExecutableAllocatorPosix.o):function JSC::ExecutableAllocator::determinePageSize(): error: undefined reference to '__page_size'
@klodha I can not fix the issue of NDK. And i don't have other errors.
@minggo For me, other error along with __page_size was with libwebsocket for method getdtablesize
. Since its confirm that these error won't appear with r10c
, I am already downloading r10c
now from the link @hamatani63 shared (thanks for sharing link @hamatani63). I can understand that NDK issue are not part of cocos2d-x and I really appreciate you putting in time to help me with r11c.
Btw, can you suggest what is difference in r11c
and r10c
in general and why one should upgrade NDK. I mean for a new project, can we stick to cocos2d-x 3.10
and NDK r10c
for long term safely without running into critical issue due to Android NDK version.
@klodha Commonly, you don't have to upgrade NDK. cocos2d-x requires upgrading NDK when it meets problems that caused by NDK, and we will mentioned it in README.
@minggo thanks for revert. Little more confident about using cocos2d-x for next project. Just waiting for r10c download to complete. If I encounter any further issue, will share the same.
I think you can close this issue for now.
That's okay with me. Thank you!
Hi @minggo I faced the same problem when upgrading to NDK r11c and now downloading the r10c to check if this problem will go away.. but backing to the NDK r10 compiling my game with android 21 cause it to crash on other older android os version on the start up of the application giving unsatisfied link error message what do you suggest and can't compile such a big project with older version take me to solve so many errors to solve what do you suggest?
@daniaDlbani What's your cocos2d-x version? And i suggested using NDK r10c, not r10. If you can describe the error in more detail, it will be easy to get helper.
@minggo so many thanks for the fast reply, I am using cocos2d-x 2.2.6 I found that it is a bug in ndk10, I was using NDKr10e
Glad to hear you fixed the issue.
in fact I haven't fixed it, but I hope cause the launch is soon I will try the ndk r10c and keep you updated..
I am using NDK r10e and when run the app on android version less than 5 (android 21 which is using in compiling the app) it crash immediatly and here what I am getting
05-08 10:29:56.581: E/AndroidRuntime(11183): FATAL EXCEPTION: main 05-08 10:29:56.581: E/AndroidRuntime(11183): Process: ae.test.test, PID: 11183 05-08 10:29:56.581: E/AndroidRuntime(11183): java.lang.UnsatisfiedLinkError: Native method not found: org.cocos2dx.lib.Cocos2dxHelper.nativeSetApkPath:(Ljava/lang/String;)V 05-08 10:29:56.581: E/AndroidRuntime(11183): at org.cocos2dx.lib.Cocos2dxHelper.nativeSetApkPath(Native Method) 05-08 10:29:56.581: E/AndroidRuntime(11183): at org.cocos2dx.lib.Cocos2dxHelper.init(Cocos2dxHelper.java:71) 05-08 10:29:56.581: E/AndroidRuntime(11183): at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:69) 05-08 10:29:56.581: E/AndroidRuntime(11183): at ae.test.test.testapp.onCreate(testapp.java:62) 05-08 10:29:56.581: E/AndroidRuntime(11183): at android.app.Activity.performCreate(Activity.java:5322) 05-08 10:29:56.581: E/AndroidRuntime(11183): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093) 05-08 10:29:56.581: E/AndroidRuntime(11183): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2303) 05-08 10:29:56.581: E/AndroidRuntime(11183): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2391) 05-08 10:29:56.581: E/AndroidRuntime(11183): at android.app.ActivityThread.access$900(ActivityThread.java:166) 05-08 10:29:56.581: E/AndroidRuntime(11183): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1281) 05-08 10:29:56.581: E/AndroidRuntime(11183): at android.os.Handler.dispatchMessage(Handler.java:102) 05-08 10:29:56.581: E/AndroidRuntime(11183): at android.os.Looper.loop(Looper.java:146) 05-08 10:29:56.581: E/AndroidRuntime(11183): at android.app.ActivityThread.main(ActivityThread.java:5511) 05-08 10:29:56.581: E/AndroidRuntime(11183): at java.lang.reflect.Method.invokeNative(Native Method) 05-08 10:29:56.581: E/AndroidRuntime(11183): at java.lang.reflect.Method.invoke(Method.java:515) 05-08 10:29:56.581: E/AndroidRuntime(11183): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283) 05-08 10:29:56.581: E/AndroidRuntime(11183): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) 05-08 10:29:56.581: E/AndroidRuntime(11183): at dalvik.system.NativeStart.main(Native Method)
What's your Android OS version? cocos2d-x supports Android 2.3+.
My Android version is 4.4.2 , Cocos2dx version 2.2.6
05-08 10:29:56.581: E/AndroidRuntime(11183): java.lang.UnsatisfiedLinkError: Native method not found: org.cocos2dx.lib.Cocos2dxHelper.nativeSetApkPath:(Ljava/lang/String;)V
The errors happened when invoking native method nativeSetApkPath
. The function is here. So it is strange why it has problem. Could you make sure cocos2dx/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp
is built and linked into libcocos2dx.so?
thanks for the reply, it is built and give this output file "Java_org_cocos2dx_lib_Cocos2dxHelper.o" by the way the app is running on android 5 devices and above.. and this problem occurs when I upgrade the NDK from 9 to 10 in order to fix the ssl warning reported by google play in the past few weeks..
Except updating NDK from 9 to 10, did you modify anything else? Such as Android.mk. And did you rebuild the source code?
Yes I have change the libcurl as mention here then clean rebuild
Ok, it is nothing about libcurl. I think it is better to create a new issue. This issue is something about v3.10.
Hi I am getting same error Can anyone let me know , how I can fix this ,my code is runing on IOS but not on android [armeabi] SharedLibrary : libcocos2dcpp.so jni/../../Classes/HelloWorldScene.cpp:40: error: undefined reference to 'cocos2d::SpriteBatchNode::create(std::string const&, long)' jni/../../Classes/HelloWorldScene.cpp:118: error: undefined reference to 'cocos2d::Array::createWithCapacity(long)' jni/../../Classes/HelloWorldScene.cpp:176: error: undefined reference to 'cocos2d::__Array::createWithCapacity(long)' ./obj/local/armeabi/objs-debug/cocos2dcpp_shared///Classes/Ball.o:Ball.cpp:function vtable for Ball: error: undefined reference to 'cocos2d::Sprite::setDisplayFrameWithAnimationName(std::string const&, long)' ./obj/local/armeabi/objs-debug/cocos2dcpp_shared///Classes/Cue.o:Cue.cpp:function vtable for Cue: error: undefined reference to 'cocos2d::Sprite::setDisplayFrameWithAnimationName(std::string const&, long)' /Users/jenkins/Library/Android/ndk/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_vector.h:898: error: undefined reference to 'std::throw_out_of_rangefmt(char const, ...)' /Users/jenkins/Library/Android/ndk/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_vector.h:898: error: undefined reference to 'std::throw_out_of_rangefmt(char const, ...)' /Users/jenkins/Library/Android/ndk/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_vector.h:898: error: undefined reference to 'std::throw_out_of_rangefmt(char const, ...)' /Users/jenkins/Library/Android/ndk/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_vector.h:898: error: undefined reference to 'std::throw_out_of_rangefmt(char const, ...)' ./obj/local/armeabi/objs-debug/cocos2dcpp_shared//__/Classes/b2Sprite.o:b2Sprite.cpp:function vtable for b2Sprite: error: undefined reference to 'cocos2d::Sprite::setDisplayFrameWithAnimationName(std::string const&, long)' collect2: error: ld returned 1 exit status make: *\ [obj/local/armeabi/libcocos2dcpp.so] Error 1 make: Leaving directory `/Users/ashishverma/Documents/CocosProjects/PoolBuddy/proj.android' Error running command, return code: 2.
i have used ndkr10c but still i got error e:\COCOS\cocos2d-x-3.12\build>python .\android-build.py cpp-empty-test -p 10 cocos compile -p android -s e:\COCOS\cocos2d-x-3.12\build..\tests/cpp-empty-tes t --ndk-mode debug Building mode: debug Using Eclipse project : e:\COCOS\cocos2d-x-3.12\tests\cpp-empty-test\proj.androi d Android platform not specified, searching a default one... running: '"E:\COCOS\sdk\tools\android" update project -t android-10 -p e:\COCOS\ cocos2d-x-3.12\tests\cpp-empty-test\proj.android'
Updated project.properties Updated local.properties Updated file e:\COCOS\cocos2d-x-3.12\tests\cpp-empty-test\proj.android\proguard- project.txt Android platform not specified, searching a default one... running: '"E:\COCOS\sdk\tools\android" update lib-project -p e:\COCOS\cocos2d-x- 3.12\cocos\platform\android\java -t android-19'
Updated project.properties Updated local.properties Updated file e:\COCOS\cocos2d-x-3.12\cocos\platform\android\java\proguard-projec t.txt Building native... NDK build mode: debug running: '"E:\COCOS\android-ndk-r10c\ndk-build" -C e:\COCOS\cocos2d-x-3.12\tests \cpp-empty-test\proj.android -j4 NDK_MODULE_PATH=e:\COCOS\cocos2d-x-3.12\tests\c pp-empty-test\proj.android../../..;e:\COCOS\cocos2d-x-3.12\tests\cpp-empty-test \proj.android../../../cocos;e:\COCOS\cocos2d-x-3.12\tests\cpp-empty-test\proj.a ndroid../../../external NDK_TOOLCHAIN_VERSION=clang NDK_DEBUG=1'
make.exe: Entering directory `e:/COCOS/cocos2d-x-3.12/tests/cpp-empty-test/proj. android' [armeabi] Compile++ thumb: cocostudio_static <= FlatBuffersSerialize.cpp [armeabi] Compile++ thumb: cocostudio_static <= WidgetCallBackHandlerProtocol.cp p [armeabi] Compile++ thumb: cocostudio_static <= CCComExtensionData.cpp [armeabi] Compile++ thumb: cocostudio_static <= CocoStudio.cpp error: error opening './obj/local/armeabi/objs-debug/cocostudio_static/WidgetCallBackHandlerPro tocol.o.d': Error opening output file './obj/local/armeabi/objs-debug/cocostudio_static/WidgetCallBackHandlerPro tocol.o.d': No such file or directory 1 error generated. make.exe: * [obj/local/armeabi/objs-debug/cocostudio_static/WidgetCallBackHand lerProtocol.o] Error 1 make.exe: * Waiting for unfinished jobs.... error: error opening './obj/local/armeabi/objs-debug/cocostudio_static/CCComExtensionData.o.d':
Error opening output file
'./obj/local/armeabi/objs-debug/cocostudio_static/CCComExtensionData.o.d':
No such file or directory
1 error generated. make.exe: *\ [obj/local/armeabi/objs-debug/cocostudio_static/CCComExtensionData .o] Error 1 error: error opening './obj/local/armeabi/objs-debug/cocostudio_static/CocoStudio.o.d': Error opening output file './obj/local/armeabi/objs-debug/cocostudio_static/CocoStudio.o.d': No such
file or directory
1 error generated. make.exe: * [obj/local/armeabi/objs-debug/cocostudio_static/CocoStudio.o] Erro r 1 error: error opening './obj/local/armeabi/objs-debug/cocostudio_static/FlatBuffersSerialize.o.d ': Error opening output file './obj/local/armeabi/objs-debug/cocostudio_static/FlatBuffersSerialize.o.d ': No such file or directory 1 error generated. make.exe: * [obj/local/armeabi/objs-debug/cocostudio_static/FlatBuffersSeriali ze.o] Error 1 make.exe: Leaving directory `e:/COCOS/cocos2d-x-3.12/tests/cpp-empty-test/proj.a ndroid' Error running command, return code: 2. Build dynamic library for project [ e:\COCOS\cocos2d-x-3.12\build..\tests/cpp-e mpty-test ] fails!
e:\COCOS\cocos2d-x-3.12\build>
i have use cocos-2dx_3.12 and ndk_r10c
please help @minggo
HI Dear, Mates I found this issues occurs when we made the project using the cocos studio and try to build the project. I made the project with command prompt and shift all the folder into it and it's working perfect. if anyone have issue let me know and want to discuss in more details contact me on ashish.verma@dazzledapps.com
Thanks & Regards Ashish Verma +919911672843 Skype: dazzledapps Website: http://www.dazzledapps.com
Hello Sir, I made the project with command prompt and download the cocos2dx-store-example-master project when I compiled the project,following error occurred-
e:\COCOS\cocos2d-x-3.11.1>cocos compile -s cocos2dx-store-example-master -m rele ase Building mode: release Using Eclipse project : e:\COCOS\cocos2d-x-3.11.1\cocos2dx-store-example-master\ proj.android Android platform not specified, searching a default one... running: '"E:\COCOS\sdk\tools\android" update project -t android-10 -p e:\COCOS\ cocos2d-x-3.11.1\cocos2dx-store-example-master\proj.android'
Updated project.properties Updated local.properties Updated file e:\COCOS\cocos2d-x-3.11.1\cocos2dx-store-example-master\proj.androi d\proguard-project.txt Building native... NDK build mode: release running: '"E:\COCOS\android-ndk-r10c\ndk-build" -C e:\COCOS\cocos2d-x-3.11.1\coc os2dx-store-example-master\proj.android -j4 NDK_MODULE_PATH=e:\COCOS\cocos2d-x-3 .11.1\cocos2dx-store-example-master\proj.android../cocos2d;e:\COCOS\cocos2d-x-3 .11.1\cocos2dx-store-example-master\proj.android../cocos2d/cocos;e:\COCOS\cocos 2d-x-3.11.1\cocos2dx-store-example-master\proj.android../cocos2d/external NDK_T OOLCHAIN_VERSION=4.9'
Android NDK: WARNING: Ignoring unknown import directory: e:\COCOS\cocos2d-x-3.11 .1\cocos2dx-store-example-master\proj.android../cocos2d/cocos Android NDK: WARNING: Ignoring unknown import directory: e:\COCOS\cocos2d-x-3.11 .1\cocos2dx-store-example-master\proj.android../cocos2d/external Android NDK: jni/Android.mk: Cannot find module with tag '.' in import path Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
make.exe: Entering directory e:/COCOS/cocos2d-x-3.11.1/cocos2dx-store-example-m aster/proj.android' jni/Android.mk:31: *** Android NDK: Aborting. . Stop. make.exe: Leaving directory
e:/COCOS/cocos2d-x-3.11.1/cocos2dx-store-example-ma
ster/proj.android'
Error running command, return code: 2.
e:\COCOS\cocos2d-x-3.11.1>
Thanks a lot.
cocos2d-x doesn't support cocostudio since v3.11 as cocosstudio is canceled.
Hi Dear, Let me check the issue on my end and I will let you know
Thanks & Regards
Ashish Verma _CEO & Founder | DazzledApps Technologies Pvt. Ltd. | _http://www.dazzledapps.com http://www.dazzledapps.com @Skype: dazzledapps Or ashish.verma404 | Email: ashish.verma@dazzledapps.com mailto:ashish.verma@dazzledapps.com?Subject=Hello%20+DazzledApps Mobile | WhatsApp : +919911672843 | LinkedIn https://in.linkedin.com/pub/ashish-verma/25/367/1b3
India HQ: H-23, Sector 63, Noida (201301), India.
CONFIDENTIALITY INFORMATION AND DISCLAIMER: The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or DazzledApps. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of DazzledApps. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited.If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect.
On Sat, Jul 23, 2016 at 5:38 PM, Purna Prakash Verma < notifications@github.com> wrote:
Hello Sir, I made the project with command prompt and download the cocos2dx-store-example-master project when I compiled the project,following error occurred-
e:\COCOS\cocos2d-x-3.11.1>cocos compile -s cocos2dx-store-example-master -m rele ase Building mode: release Using Eclipse project : e:\COCOS\cocos2d-x-3.11.1\cocos2dx-store-example-master\ proj.android Android platform not specified, searching a default one... running: '"E:\COCOS\sdk\tools\android" update project -t android-10 -p e:\COCOS\ cocos2d-x-3.11.1\cocos2dx-store-example-master\proj.android'
Updated project.properties Updated local.properties Updated file e:\COCOS\cocos2d-x-3.11.1\cocos2dx-store-example-master\proj.androi d\proguard-project.txt Building native... NDK build mode: release running: '"E:\COCOS\android-ndk-r10c\ndk-build" -C e:\COCOS\cocos2d-x-3.11.1\coc os2dx-store-example-master\proj.android -j4 NDK_MODULE_PATH=e:\COCOS\cocos2d-x-3
.11.1\cocos2dx-store-example-master\proj.android../cocos2d;e:\COCOS\cocos2d-x-3
.11.1\cocos2dx-store-example-master\proj.android../cocos2d/cocos;e:\COCOS\cocos 2d-x-3.11.1\cocos2dx-store-example-master\proj.android../cocos2d/external NDK_T OOLCHAIN_VERSION=4.9'
Android NDK: WARNING: Ignoring unknown import directory: e:\COCOS\cocos2d-x-3.11 .1\cocos2dx-store-example-master\proj.android../cocos2d/cocos Android NDK: WARNING: Ignoring unknown import directory: e:\COCOS\cocos2d-x-3.11 .1\cocos2dx-store-example-master\proj.android../cocos2d/external Android NDK: jni/Android.mk: Cannot find module with tag '.' in import path Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched: Android NDK: make.exe: Entering directory e:/COCOS/cocos2d-x-3.11.1/cocos2dx-store-example-m aster/proj.android' jni/Android.mk:31: *\ Android NDK: Aborting. . Stop. make.exe: Leaving directory e:/COCOS/cocos2d-x-3.11.1/cocos2dx-store-example-ma ster/proj.android' Error running command, return code: 2. e:\COCOS\cocos2d-x-3.11.1>
Thanks a lot.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cocos2d/cocos2d-x/issues/15417#issuecomment-234714843, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ98F13t4JcoptViM8zybJJxQMszfRX9ks5qYgQogaJpZM4IFds6 .
E:/BaiduYunDownload/cocos2d-x-2.2.0/external/libwebsockets/android/./lib/armeabi/libwebsockets.a(libwebsockets.c.o):libwebsockets.c:function libwebsocket_create_context: error: undefined reference to 'getdtablesize' clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [E:/BaiduYunDownload/cocos2d-x-2.2.0/samples/Cpp/adai/proj.android.cm/obj/local/armeabi/libcocos2dcpp.so] Error 1 @minggo
Sorry, 2.2.0 is too old. We don't have resource to support it.
Try adding to the Android.mk file:
LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
I don't recommend doing LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
This will probably make the build process successful but your application will crash.
I'm trying to build a sample program to make an Android app. I used cocos2d-x-3.10 (also 3.11), and tried a command below:
Then its execution gave errors.
Another member found the same problem in https://github.com/cocos2d/cocos2d-x/issues/15309. How do I fix it?