XMLHttpRequest on android with Cocos2d-JS

Hi,

I tried to make some XMLHttpRequest with Cocos2d-JS, but an error shows up:

04-11 13:38:38.002 19485-19657/? W/art: Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[18,tid=19657,Native,Thread*=0xb3714400,peer=0x12dfbf40,"Thread-31388"]

The code:

var xhr = cc.loader.getXMLHttpRequest();
xhr.open("GET", "http://httpbin.org/get");
xhr.onreadystatechange = function () {
cc.log("in onreadystatechange")
};
xhr.send();

The permission for internet is there, and this code is working fine on the web version.

Any hint to make it work on android?

Thanks!

You can try to use the XMLHttpRequest directly

var xmlhttp = new XMLHttpRequest();

I had never any problems with this on native.

I tried that, and same result. That was on a Nexus 5 with android 6.0.1

I tried then with a nexus 7 2012 with android 4.4.4 and I had:

 W/dalvikvm: dvmFindClassByName rejecting 'org/cocos2dx/lib/Cocos2dxHttpURLConnection'

Any idea of what else I could try?