SuperHich / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

Error after Updating Android SDK and ADT #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello, I have a problem.
When I updated Android SDK tool to version 17 and the ADT to 17 I can't use 
ksoap2 any more.  

I start the app and get this error:
03-25 20:13:49.995: E/AndroidRuntime(555): FATAL EXCEPTION: main
03-25 20:13:49.995: E/AndroidRuntime(555): java.lang.NoClassDefFoundError: 
org.ksoap2.serialization.SoapObject
03-25 20:13:49.995: E/AndroidRuntime(555):  at 
com.alcad.pernat.praksa.SplashScreen.pridobiDanasnjo(SplashScreen.java:124)
03-25 20:13:49.995: E/AndroidRuntime(555):  at 
com.alcad.pernat.praksa.SplashScreen.onCreate(SplashScreen.java:73)
03-25 20:13:49.995: E/AndroidRuntime(555):  at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-25 20:13:49.995: E/AndroidRuntime(555):  at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
03-25 20:13:49.995: E/AndroidRuntime(555):  at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
03-25 20:13:49.995: E/AndroidRuntime(555):  at 
android.app.ActivityThread.access$2300(ActivityThread.java:125)
03-25 20:13:49.995: E/AndroidRuntime(555):  at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
03-25 20:13:49.995: E/AndroidRuntime(555):  at 
android.os.Handler.dispatchMessage(Handler.java:99)
03-25 20:13:49.995: E/AndroidRuntime(555):  at 
android.os.Looper.loop(Looper.java:123)
03-25 20:13:49.995: E/AndroidRuntime(555):  at 
android.app.ActivityThread.main(ActivityThread.java:4627)
03-25 20:13:49.995: E/AndroidRuntime(555):  at 
java.lang.reflect.Method.invokeNative(Native Method)
03-25 20:13:49.995: E/AndroidRuntime(555):  at 
java.lang.reflect.Method.invoke(Method.java:521)
03-25 20:13:49.995: E/AndroidRuntime(555):  at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-25 20:13:49.995: E/AndroidRuntime(555):  at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-25 20:13:49.995: E/AndroidRuntime(555):  at 
dalvik.system.NativeStart.main(Native Method)

I should get String whit some numbers but instead I get this error.

I was using ksoap2-2.5.4.jar and tried the new 
ksoap2-android-assembly-2.6.2-jar-with-dependencies.jar.
I'm using Eclipse indigo, Ubuntu 11.04.

The code looks like this:
SoapObject Request =new SoapObject(NAMESPACE,METHOD_NAME); // her i get the 
error
                    SoapSerializationEnvelope soapEnvelope=new SoapSerializationEnvelope(SoapEnvelope.VER11);
                    soapEnvelope.dotNet=false;

                    String tmp=odstejDatum(datum);
                    Request.addProperty("datumod",tmp);
                    Request.addProperty("datumdo",datum);
                    Request.addProperty("tip_lme",1);
                    @SuppressWarnings("deprecation")
                    HttpTransportSE aht=new HttpTransportSE(URL,5000);
                    soapEnvelope.setOutputSoapObject(Request);  
//                  

                    aht.call(SOAP_ACTION_DANASNJI,soapEnvelope);                    
                    Object response= soapEnvelope.getResponse();    

Thanks for the help. 

Original issue reported on code.google.com by primoz.p...@gmail.com on 25 Mar 2012 at 6:19

GoogleCodeExporter commented 9 years ago
Dependencies are managed differently in 17. How are you including ksoap? Using 
Maven or Ant or the ADT?

Original comment by mosa...@gmail.com on 26 Mar 2012 at 5:48

GoogleCodeExporter commented 9 years ago
If you are using the bundle jar and the SDK itself you have to put it into the 
libs folder.. 

Original comment by mosa...@gmail.com on 26 Mar 2012 at 8:53

GoogleCodeExporter commented 9 years ago
Thanks a lot this resolve my problem.

Original comment by primoz.p...@gmail.com on 28 Mar 2012 at 7:03

GoogleCodeExporter commented 9 years ago

Original comment by mosa...@gmail.com on 28 Mar 2012 at 5:30