The import org.ksoap2.transport.HttpTransportSE cannot be resolved
Asked Answered
S

4

5

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;   
Sundae answered 30/9, 2011 at 6:59 Comment(0)
M
6

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?

Morphia answered 30/9, 2011 at 8:29 Comment(0)
T
4

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/

Tonometer answered 15/6, 2012 at 3:40 Comment(0)
P
1

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

Pavior answered 16/1, 2013 at 9:27 Comment(0)
H
0

You will Have to add it to Library. (I am using Android Studio)

Right click the library file in the Android Studio(shown under project_name/app/libs/ -> there will an option "Add As Library", select that

Then A dialogue box will appear where you will have to Select the Module

Thats IT! :)

Huneycutt answered 19/1, 2015 at 14:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.