Using HttpCore from a blackberry
I am trying to port an android app to run on a blackberry 8800. One of the classes makes http requests through apache HttpCore.
I get the following error:
The type java.lang.reflect.Type cannot be resolve开发者_开发知识库d. It is indirectly referenced from required .class files
ProjectFoo-BBerry/src/com/projectfoo/ws/rest/ProjectFooClient.java (line 1)
Is reflections not available on the blackberry? Is there something I need to enable in eclipse? I have not programmed extensively in Java.
Reflection isn't available on J2ME platforms. Look for another way to accomplish your task.
Yes, as Ben noted there are limitations in J2ME and furthermore, the networking and HTTP stacks on BlackBerry devices is somewhat primitive compared to other mobile APIs, in that you have to do a lot of the "plumbing" yourself - selecting transports and configuring them correctly. This is becoming a bit easier with the 5.0 API but most devices are still pre-5.0.
精彩评论