cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Android SDK and sample app not working

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] 

mrbill1958
Member
1 ACCEPTED SOLUTION

Accepted Solutions

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. 

View solution in original post

spencer
Member
2 REPLIES 2

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. 

spencer
Member

Thank you, that worked.