Skip to content

HttpClient does not work correctly with android 5.0 #9138

Closed

Activity

minhtoantm

minhtoantm commented on Nov 20, 2014

@minhtoantm

Please fix it as soon as, I'm realy happy when it is fixed.
Thanks you.

lokukuol

lokukuol commented on Nov 20, 2014

@lokukuol

I have the same problem. Please fix it as soon as possible,
Thanks you.

ombug

ombug commented on Nov 20, 2014

@ombug

HttpClient stop at curl_easy_perform() and can't go on ,please fix the bug quickly.

dumganhar

dumganhar commented on Nov 21, 2014

@dumganhar

Hi all, we will fix it when we get an Android 5.0 device to reproduce this issue. :)

dumganhar

dumganhar commented on Nov 21, 2014

@dumganhar

@minhtoantm, @lokukuol ,@ombug, could this issue be reproduced on android 5.0 emulator?

minhtoantm

minhtoantm commented on Nov 21, 2014

@minhtoantm

@dumganhar : sorry, I can start my android 5 emulator ( I use genymotion), so I don't know is this issue be reproduced.

hayago

hayago commented on Nov 21, 2014

@hayago

@dumganhar : Yes, this issue could be reproduced on android 5.0 emulator.

dumganhar

dumganhar commented on Nov 21, 2014

@dumganhar

@hayago , thanks. I will check it soon.

jiyucn

jiyucn commented on Nov 22, 2014

@jiyucn

You guy working on Wangjing Fangheng, right? If possible, I would like to share my Android 5.0 device with you guys. :-)

cashish

cashish commented on Nov 22, 2014

@cashish

I encountered the same problem using nexus 5 with android lollipop but with cocos2d-x ver 3.2
there is no callback to onHttpRequestCompleted

modified the milestones: v3.3, v3.3rc1 on Nov 24, 2014

30 remaining items

ombug

ombug commented on Nov 26, 2014

@ombug

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

minggo

minggo commented on Nov 26, 2014

@minggo
ContributorAuthor

I think you should use latest libcurl.a here: https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin.

jiyucn

jiyucn commented on Nov 27, 2014

@jiyucn

@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?

redism

redism commented on Nov 27, 2014

@redism

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.

redism

redism commented on Nov 27, 2014

@redism

For anyone who is still stuck, these are steps I successfully resolved this issue, both on Android-5 device and Android<5 devices.

  • changed cocos2d-x to the latest version on github
  • changed ndk to r10c (64 bit)
  • set target=android-20 (proj.android/project.properties)
  • added APP_PLATFORM := android-9 (proj.android/jni/Application.mk)
WenhaiLin

WenhaiLin commented on Nov 27, 2014

@WenhaiLin
Contributor

@redism Thank you.Whether you use gnustl_static + gcc4.9 for build project ? I will check again.

jiyucn

jiyucn commented on Nov 27, 2014

@jiyucn

Fixed.

  1. Cocos2d-x 3.2 final release.
  2. Build based on android ndk r10c.
  3. Using the lasted liburl from https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin

Thanks you guys.

redism

redism commented on Nov 27, 2014

@redism

@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

aeonmine

aeonmine commented on Dec 1, 2014

@aeonmine
Contributor

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

happyfire

happyfire commented on Feb 2, 2015

@happyfire

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.

mdsb100

mdsb100 commented on Feb 9, 2015

@mdsb100

how about cocos2d-x-2.2.6 ?

modified the milestones: v3.3rc1, v3.3 on Apr 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @walzer@minggo@dumganhar@redism@hayago

      Issue actions

        HttpClient does not work correctly with android 5.0 · Issue #9138 · cocos2d/cocos2d-x