我有Android项目,我想在其中使用ksoap2。我无法在我的课堂上导入ksoap2
我将.jar(ksoap2)粘贴到我的文件夹库中,然后右键单击并继续“添加为库”。
之后我同步我的gradle产出,在文件的build.gradle Android Studio中更新的依赖,就像这样:
编译文件( '库/ ksoap2-机器人组装-3.6.1.jar' )
最后在我的课MainActiviy.java我想输入import org.ksoap2.Envelope,IDE不能识别类ksoap2。
mi程序有什么问题?
此致敬礼。
非常感谢。我认为我的build.gradle是正确的。是: apply plugin:'com.android.application'dependencies {compile fileTree(include:['* .jar'],dir:'libs')androidTestCompile('com.android.support.test.espresso:espresso- core:2.2.2',{exclude group:'com.android.support',module:'support-annotations'})compile'com.android.support:appcompat-v7:23.4.0'compile'com.android。 support.constraint:constraint-layout:1.0.0-alpha9'testCompile'junit:junit:4.12'compile files('libs/ksoap2-android-assembly-3.6.1.jar')} 它不正确? –