Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The import org.ksoap2.transport.HttpTransportSE cannot be resolved

I downloaded ksoap2 from this link:

after importing the downloaded .jar file into an Android project in Eclipse, I got import error for only the first import line (HttpTransportSE). I searched but nobody else has had/posted this issue. How could this be? thanks!

import org.ksoap2.transport.HttpTransportSE; //ERROR:The import org.ksoap2.transport.HttpTransportSE cannot be resolved
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;   
like image 214
user972570 Avatar asked Sep 30 '11 06:09

user972570


3 Answers

You've downloaded the J2ME package, but HttpTransportSE is part of the J2SE jar file.

Shouldn't ksoap2-j2se-full-2.1.2.jar work just fine with Android?

like image 94
Jens Avatar answered Nov 12 '22 18:11

Jens


Use this library its specific for android and it worked for me (Ksoap2-j2se-full didn't work for me as well)

http://code.google.com/p/ksoap2-android/

like image 39
Shark Avatar answered Nov 12 '22 18:11

Shark


You should use ksoap2-android-assembly-2.6.3-jar-with-dependencies.jar file. visit http://code.google.com/p/ksoap2-android/wiki/HowToUse?tm=2

like image 1
MRX Avatar answered Nov 12 '22 20:11

MRX