我有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')} 它不正確? –