I can't get the sample app to work. It seems like there is a reference to the java_sdk http client but the readme doesn't say it does. It comples fine but gives a run time error. I have tried linking in the java_sdk and apache libraies but nothing works. Below is the source and the call stack where the error occurs.
public class SDKActivity extends Activity {
publicstatic AuthNet authNet;
static {
HttpClient.
HTTP_CONNECTION_TIMEOUT = 0;
Thread [<1> main] (Suspended (exception NoClassDefFoundError))
SDKActivity.<clinit>() line: 30
Class.newInstanceImpl() line: not available [native method]
Class.newInstance() line: 1429
Instrumentation.newActivity(ClassLoader, String, Intent) line: 1021
ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2577
ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2679
ActivityThread.access$2300(ActivityThread, ActivityThread$ActivityRecord, Intent) line: 125
ActivityThread$H.handleMessage(Message) line: 2033
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 4627
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521
ZygoteInit$MethodAndArgsCaller.run() line: 868
ZygoteInit.main(String[]) line: 626
NativeStart.main(String[]) line: not available [native method]
Solved! Go to Solution.
โ10-11-2012 05:38 AM
Hi,
Try putting the external libraries in the /libs folder of your project, rather than /lib. The newer Android SDK looks in the libs folder, and will give you this error if the dependencies are located elsewhere.
โ10-18-2012 12:57 PM
Hi,
Try putting the external libraries in the /libs folder of your project, rather than /lib. The newer Android SDK looks in the libs folder, and will give you this error if the dependencies are located elsewhere.
โ10-18-2012 12:57 PM
Thank you, that worked.
โ11-03-2012 04:46 PM