libhu libhu - 5 months ago 282
Android Question

Failed to implement ksoap2-android-assembly-3.6.0 within Android Studio

I am working on a ONVIF Android application project. I found out that it is based on web services and SOAP protocol.
Afterward, I downloaded the ksoap2-android-assembly-3.6.0.JAR library in order to use the classes such as SoapObject. I put it under libs directory and set it as Library.

The problem is that I cannot import org.ksoap2.SoapObject;
Please help !

Here is my dependencies in gradle file

Answer

I imported it like this:

repositories {
    maven { url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/' }
}
dependencies {
    compile 'com.google.code.ksoap2-android:ksoap2-android:3.6.1'
}

and

import org.ksoap2.serialization.SoapObject;
Comments