【发布时间】:2020-01-09 23:21:05
【问题描述】:
我正在开发一个 Android 应用程序项目。它基于 Web 服务和 SOAP 协议。我有 ksoap2-android-assembly-2.4-jar-with-dependencies.JAR 库,以便使用 SoapObject 等类。我把它放在libs目录下,设置为Library。
错误是
org.gradle.internal.exceptions.LocationAwareException:执行 任务“:app:javaPreCompileDebug”失败。 org.gradle.api.internal.artifacts.transform.TransformException: IdentityTransform 执行失败:D:\Android\All Crops 2019 年 5 月 3 日\xxxxxxx\app\libs\ksoap2-android-assembly-2.4-jar-with-dependencies.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'
}
【问题讨论】:
标签: android android-gradle-plugin dependencies android-studio-3.5