I'm trying to make kSOAP working in my Android project with Gradle.
This is my project's build.gradle file:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
maven {
url 'http://ksoap2-android.googlecode.com/svn/m2-repo'
}
}
android {
compileSdkVersion 18
buildToolsVersion "18.0.1"
defaultConfig {
minSdkVersion 7
targetSdkVersion 18
}
}
dependencies {
compile 'com.android.support:support-v4:18.0.0'
compile 'ch.acra:acra:4.5.0'
compile 'com.google.guava:guava:12.0'
compile 'com.google.code.ksoap2-android:ksoap2-android:3.0.0'
}
The library seems to be included in the project and compilation DOES work but when I try to import a class (ie SoapObject) it seems like the namespace does not even exist. The funny thing is that the other libraries (such as ACRA or Guava) are working fine. How can I solve this problem?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…