App42 java sdk crash on android with java.lang.NoSuchMethodError: org.apache.http.util.EntityUtils.consume

+1 vote
It seems that the java sdk uses a higher version of apache httpclient library than what is bundled with android that has methods that android's version doesn't.

Even if I put httpclient-4.1.jar and httpcore-4.1.jar in the libs folder, android seems to use it's own library which doesn't have the EntityUtils.consume method, which leeds to this crash.

What can I do to get around this problem? Putting the library higher in eclipse's Order and Export doesn't make any difference, and I can't use the android sdk instead, since I'm using libgdx and I want everything to work the same on all platforms without abstractions.
asked Nov 16, 2014 in App42 Cloud API-BaaS by johanb3 (20 points)
Use the Java App42 SDK for your desktop app and the Android App42 SDK for you android app. You can specify platform specific code in libGDX. see: https://github.com/libgdx/libgdx/wiki/Interfacing-with-platform-specific-code

1 Answer

0 votes
 
Best answer

Hello John,

Support of libgdx in App42 platform is not available yet however we have recorded your request to our backlog, will update this thread as soonas we come up with the timeline. 

Thanks for having patience & co-operation with us.

Himanshu Sharma

answered Nov 16, 2014 by hs00105 (2,005 points) 1 flag
selected Nov 16, 2014 by johanb3
Any idea when this fix will get added. I am having the same issue and it makes programming user interactions through App42 impossible
Hello Anomalyaces,

You can try with our J2ME SDK, it does not use HTTP library and should work in this case. Please check and confirm.
Find the J2ME SDK at the below link (https://github.com/shephertz/App42_J2ME_SDK).
Thanks,
HImanshu Sharma
Hey HImanshu,

I tried to use the j2me SDK but i got a No Class Def Found Error for javax.mircoedition.io.connector. Was there more files needed to use the J2ME sdk?

Thanks,
Anomaly Aces
Hello Anomaly,

We are looking into it & update this thread soon with the timeline of libgdx support.

Thanks,
Himanshu Sharma
Hi Himanshu, I'm having the same problem. I tried everything I can find on the web. I thought the issue was with the conflict of HTTP classes as mentioned here: https://hc.apache.org/httpcomponents-client-4.3.x/android-port.html But the httpclient library provided by you does not implement the HC4 classes. Any updates on this issue??
Use the Java App42 SDK for your desktop app and the Android App42 SDK for you android app. You can specify platform specific code in libGDX. see: https://github.com/libgdx/libgdx/wiki/Interfacing-with-platform-specific-code
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...