Android network error

You must Login before you can answer or comment on any questions.

Hello, I made an application that is fully working on iPhone, but when I try to compile it for Android, even on the simulator, I'm getting this error:

W/NetworkManagementSocketTagger(88): setKernelCountSet(10009, 0) failed with errno -2

What the application does is basically start an HTTP request to a server to fetch some images.

Does anyone know how to solve this issue? Thanks

— asked 2 years ago by Daniele De Matteo
3 Comments
  • You will need to post your http code ...

    — commented 2 years ago by Trevor Ward

  • can you share the build.log?

    — commented 2 years ago by Mauro Parra

  • Thank you guys, probably it was a misconfiguration with the Android SDK version, also I was feeding my windows using modules, like

    ..
    var AppCollection = require('/ui/AppCollection');
    var win2 = new AppWindow(L('Collection'))
    ..
    this in Android, I don't know why, doesn't trigger the 'show' event from the tabGroup, so nothing was being displayed in my tabs, since I was loading the content of the window within a function handler for the show event...

    Sorry for my English and for posting a question like this....It's the first app I'm doing with appcelerator which is a great product by the way!

    — commented 2 years ago by Daniele De Matteo

1 Answer

I didn't post code since I don't know where exactly the error happens..the app just wont start... this is the function that does the http request anyway:

function updateFeed(data, onLoadHandler, onErrorHandler, stateChangeHandler) {
    if(Titanium.Network.networkType != Titanium.Network.NETWORK_NONE) {
        //fetch feed
        var xhr = Ti.Network.createHTTPClient({
            onload : onLoadHandler,
            onerror : onErrorHandler,
            onreadystatechange : stateChangeHandler
        });
 
        xhr.open('POST', data.url);
        xhr.send(data);
        log('**********************' + data.url);
        return "sent";
 
    } else
        log( "no_connection");
}
Now the callbacks just logs this.

Your Answer

Think you can help? Login to answer this question!