Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (titanium.network.httpclient)
Viewing all articles
Browse latest Browse all 13

Httpclient not working after generating android apk

$
0
0

I ran into the following problem: our app was working fine in both emulator and device (tested through Run on Device). We were using Titanium SDK 1.6.1.

We then generated the apk through Distribute (following all the necessary steps, keystores and all that). When installing the application through the apk installer (transferred to the a Motorola Milestone via USB), we found that the app would hang at splash screen, due to known issue of NPE. The only way we found to overcome that was moving to Titanium SDK 1.6.2.

But, another problem arose. After generating the apk file through Distribute, my app won't connect to the internet. I have some code connecting to a server for login purposes, and it has always worked. But now, the httpclient seems to be failing. I cannot get a connection, in both emulator or device.

Now, if I do a rebuild of the code, it will start working again. As soon as I create the apk, it fails again. I dont know where the problem could be. I tried this in tiapp.xml, but hasnt made any difference:

<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest> 
<uses-permission android:name="android.permission.INTERNET"/> 
</manifest>
</android>
Any help would be appreciated, thank you very much guys...

Viewing all articles
Browse latest Browse all 13

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>