我正在开发一个 Android 应用程序项目。它基于 Web 服务和 SOAP 协议。我有 ksoap2-android-assembly-2.4-jar-with-dependencies.JAR 库,以便使用 SoapObject 等类。我将它放在 libs 目录下并将其设置为库。
错误是
org.gradle.internal.exceptions.LocationAwareException:任务':app:javaPreCompileDebug'的执行失败。org.gradle.api.internal.artifacts.transform.TransformException:IdentityTransform 执行失败:D:\Android\All Crops 03-May-19\xxxxxxx\app\libs\ksoap2-android-assembly-2.4-jar-with-依赖项.jar。
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation files('libs/ksoap2-android-assembly-2.4-jar-with-dependencies.jar')
//implementation files('libs/ksoap2-android-assembly-3.5.0.jar')
implementation 'com.android.support:cardview-v7:28.0.0'
}