Closed minggo closed 9 years ago
Please fix it as soon as, I'm realy happy when it is fixed. Thanks you.
I have the same problem. Please fix it as soon as possible, Thanks you.
HttpClient stop at curl_easy_perform() and can't go on ,please fix the bug quickly.
Hi all, we will fix it when we get an Android 5.0 device to reproduce this issue. :)
@minhtoantm, @lokukuol ,@ombug, could this issue be reproduced on android 5.0 emulator?
@dumganhar : sorry, I can start my android 5 emulator ( I use genymotion), so I don't know is this issue be reproduced.
@dumganhar : Yes, this issue could be reproduced on android 5.0 emulator.
@hayago , thanks. I will check it soon.
You guy working on Wangjing Fangheng, right? If possible, I would like to share my Android 5.0 device with you guys. :-)
I encountered the same problem using nexus 5 with android lollipop but with cocos2d-x ver 3.2 there is no callback to onHttpRequestCompleted
@jiyucn , thanks for sharing. I have gotten a Nexus 5 with android5.0. I will look inside this issue. :)
Hi @redism, @minhtoantm, @lokukuol, @ombug, @hayago, @jiyucn, @cashish I tested this issue. And found that HttpClient works without crash and
request->setResponseCallback([this](network::HttpClient *sender, network::HttpResponse *response) {
CCLOG("ResponseCallback called.");
});
the callback could be invoked. Anything i missed?
This bug don't happend when using cocos2d-x v2.2.5 on Android 5.0
I used the test codes written by @hayago here (https://github.com/hayago/HttpClientSample-cocos2dx/blob/master/Classes/AppDelegate.cpp).
I'm using the latest codes on github v3 branch. And my device is Nexus 5 Android 5.0
.
Can you use ccp-tests project and check? I'm using code in this sample.
@minhtoantm ,yes , I also used cpp-tests for testing. But it works ok. :(
I'm using cocos2d-x final v3.2 in website cocos2d-x.org, and ccp-tests don't work. Can you give me a link what you use?
@minhtoantm , I used the latest codes on github. You could follow the readme from https://github.com/cocos2d/cocos2d-x to clone the latest codes. I seems that this issue was fixed in the latest codes. :)
Thanks a lot, I will check
I will also check this problem in final 3.2. :)
Hi all, I have checked the issue by using final3.2 version. Yep, the issue did exist. But I could not reproduce it by the latest codes on github. It seems to be fixed. :) Could someone who got the problem also test it by the latest code on github? Thanks.
Hi @dumganhar: can you check it again? I'm get lastest code from githup, and build ccp-tests, but the issue did exist. I'm using Nexus 5 android 5.0 ( not emulator)
@minhtoantm , it's really strange. We're using the same android device but the result is different. What's the ndk version you're using? I'm using ndk-r10c.
@dumganhar : Sorry, I'm using ndk 9c, I will build again now.
@dumganhar : When I use ndk-r10c to build, this issue is fixed. Can you release cocos2d-x v3.3 final? Because using lastest code from github is not stable.
I works fine httpclient in v3.3rc0
this is my android.MK
NDK_TOOLCHAIN_VERSION=4.8 APP_STL := gnustl_static APP_CPPFLAGS := -frtti -DCOCOS2D_DEBUG=1 -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char APP_CPPFLAGS += -fexceptions
you can try this
@minhtoantm, thanks for testing.
When I use ndk-r10c to build, this issue is fixed.
So it was fixed by using the latest codes on github and using ndk-r10c, right?
Can you release cocos2d-x v3.3 final? Because using lastest code from github is not stable.
We're preparing 3.3rc1 this week, if without any problems, 3.3 final will be released at next weekend. :)
@aeonmine , what's difference of your workaround? Did you find the real reason of this issue? Thanks.
@dumganhar : yes, when I use ndk-r10c with lastest code in github this issue is fixed. I'm wating 3.3 final from you. Thanks a lot.
@aeonmine , can you tell me why you so set MK file?
@dumganhar Can you tell how to compile with ndk-r10c and cocos2dx 3.3rc0 success? I had try the http://www.cocos2d-x.org/news/307,but still have errors.
@lokukuol , what kinds of error you met?
@dumganhar,hi,I send the errors log to your email.
@dumganhar i'm NDKr10c and cocos2dx3.2rc, but complie lua fail i have referenced the http://cocos2d-x.org/news/307 following the error
C:\cocos2d-x-client\frameworks\runtime-src\proj.android../../cocos2d-x/external/curl/prebuilt/android/armeabi/libcurl.a(sha512-armv4.o): requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC C:\cocos2d-x-client\frameworks\runtime-src\proj.android../../cocos2d-x/external/lua/luajit/prebuilt/android/armeabi/libluajit.a(lib_base.o):lib_base.c:function lj_cf_print: error: undefined reference to 'swbuf' C:\cocos2d-x-client\frameworks\runtime-src\proj.android../../cocos2d-x/external/lua/luajit/prebuilt/android/armeabi/libluajit.a(lib_base.o):lib_base.c:function lj_cf_print: error: undefined reference to 'swbuf' C:\cocos2d-x-client\frameworks\runtime-src\proj.android../../cocos2d-x/external/lua/luajit/prebuilt/android/armeabi/libluajit.a(lib_io.o):lib_io.c:function io_file_read: error: undefined reference to '__srget' C:\cocos2d-x-client\frameworks\runtime-src\proj.android../../cocos2d-x/cocos//editor-support/cocostudio/CCComAttribute.cpp:32: error: relocation overflow in R_ARM_THM_CALL C:\cocos2d-x-client\frameworks\runtime-src\proj.android../../cocos2d-x/cocos//editor-support/cocostudio/CCComAudio.cpp:31: error: relocation overflow in R_ARM_THM_CALL ...many error: relocation overflow in R_ARM_THM_CALL ......... Who can help me !
+@samuele3hu +@andyque Please help to check the problem @ombug met. Thanks.
D:\developer\cocos2d-x-3.3rc0\external/lua/luajit/prebuilt/android/armeabi/libluajit.a(lib_base.o):lib_base.c:function lj_cf_print: error: undefined reference to 'swbuf' D:\developer\cocos2d-x-3.3rc0\external/lua/luajit/prebuilt/android/armeabi/libluajit.a(lib_base.o):lib_base.c:function lj_cf_print: error: undefined reference to 'swbuf' D:\developer\cocos2d-x-3.3rc0\external/lua/luajit/prebuilt/android/armeabi/libluajit.a(lib_io.o):lib_io.c:function io_file_read: error: undefined reference to '__srget' clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation) make.exe: *\ [obj/local/armeabi/liblua_empty_test.so] Error 1
How can solve this?
@lokukuol You should rebuild luajit. For more information: http://discuss.cocos2d-x.org/t/build-android-base-on-ndk-r10c/18543
I compile lua is success with ndk r10b and cocos2dx 3.2rc0 , but httpclient is not work. Is must use lastest code and nkd r10c ?
@ombug I think you only need use ndk r10c.
Yes, i compile success with NDK r10c , but Lua is different from C++, follow my steps 1: referenced http://cocos2d-x.org/news/307 2: referenced http://discuss.cocos2d-x.org/t/build-android-base-on-ndk-r10c/18543 3: use cocos2d-x-2.1.5\cocos2dx\platform\third_party\android\prebuilt\libcurl\libs\armeabi\libcurl.a to replace ,I use the lastest code to replace the curl is not work
I think you should use latest libcurl.a here: https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin.
@minggo
I tried to resolve this android 5.0 libcurl issue on our game (Our game is based on cocos 3.2 final release)
I use NDK r9d to build the game and replace libcurl with in your link https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin. But libcurl still fails to work on Android 5.0.
Am I missing something?
I could solve this issue by using latest github cocos2dx + ndk r10c (64bit). But newly compiled binary does not work on Android < 5 devices. (Because of this issue : https://code.google.com/p/android-developer-preview/issues/detail?id=168 )
It may or may not be related to cocos2d-x. I'm looking into this problem now.
For anyone who is still stuck, these are steps I successfully resolved this issue, both on Android-5 device and Android<5 devices.
@redism Thank you.Whether you use gnustl_static + gcc4.9 for build project ? I will check again.
Fixed.
Thanks you guys.
@Dhilan007 These are Application.mk settings I used.
APP_STL := c++_static NDK_TOOLCHAIN_VERSION := clang
APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char -DCOCOS2D_DEBUG=1 APP_LDFLAGS := -latomic
LIBCXX_FORCE_REBUILD := true APP_ABI := armeabi-v7a APP_PLATFORM := android-9
I tested android5.0(L) on cocos2dx_v3.2, it was works fine and then when update to cocos2dx_v3.3 rc0. the BMFont and Httplicent will cause application freeze.
I just copy cocos2dx_v3.2 application.mk to cocos2dx_v3.3 rc0 that both work fine.
Android L (5.0) use art and changed jni role
i will test cocos2dx_v3.3 to find the real reson.
thanks
Hello, I have make our app compiled against ndk r10c, cocos2dx-3.2, and the latest libcurl prbuild, but when run on android 5.0, there is a error: 02-02 13:34:55.854: A/art(32240): art/runtime/verifier/method_verifier.cc:3321] Check failed: !Thread::Current()->IsExceptionPending() The app can not be lanuched. Anyone can give some help? Thanks!
Update: The problem is only happend when we build on mac platform, using ndk r10c-64 for mac. The things is OK after we use windows platform to build. It is strange.
how about cocos2d-x-2.2.6 ?
Detail information please refer to http://discuss.cocos2d-x.org/t/httpclient-does-not-work-correctly-with-android-5-0/18190/6.