错误:任务':app:transformClassesWithMultidexlistForDebug'ccid-1.1.5的执行失败

时间:2019-01-15 13:03:49

标签: java android gradle

我连续几天遇到此错误,尝试了一些解决方案,但仍然给我同样的错误。

  

org.gradle.api.tasks.TaskExecutionException:任务':app:transformClassesWithMultidexlistForDebug'的执行失败。      引起原因:java.lang.RuntimeException:java.io.IOException:无法读取[D:\ EDenetiS \ app \ build \ intermediates \ transforms \ jarMerging \ debug \ jars \ 1 \ 1f \ combined.jar](可以t进程类[com / scdroid / ccid / c.class](堆栈映射框中的未知验证类型[29])       在com.android.builder.profile.Recorder $ Block.handleException(Recorder.java:55)       在com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)       在com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:176)       在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处       在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)       在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)       在java.lang.reflect.Method.invoke(Method.java:498)       在org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)       在org.gradle.api.internal.project.taskfactory.IncrementalTask​​Action.doExecute(IncrementalTask​​Action.java:50)       在org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)       在org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)       在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter $ 1.run(ExecuteActionsTaskExecuter.java:124)       在org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)处       在org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)       在org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)       在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)       在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)处       在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)

该库是我要使用的:编译文件('libs / ccid-1.1.5.jar')

我的gradle文件:

apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '26.0.1'
useLibrary 'org.apache.http.legacy'
defaultConfig {
    applicationId "tr.gov.gib.edenetis"
    minSdkVersion 19
    targetSdkVersion 26
    multiDexEnabled true
}

dexOptions {
    javaMaxHeapSize "4g"
}

buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}

packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/dependencies.txt'
    exclude 'META-INF/LGPL2.1'
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7
}
}

dependencies {
compile 'com.android.support:support-v4:26.1.0'
compile 'com.android.support:multidex:1.0.0'
compile 'com.google.android.gms:play-services-maps:7.8.0'
compile files('libs/akiscif-2.4.7.jar')
//    compile files('libs/android-support-annotations.jar')
compile files('libs/asn1rt-6.5.3.jar')
compile files('libs/ccid-1.1.5.jar')
compile files('libs/devsmartlib.jar')
compile files('libs/jackson-annotations-2.5.0.jar')
compile files('libs/jackson-core-2.5.0.jar')
compile files('libs/jackson-databind-2.5.0.jar')
compile files('libs/jcifs-1.3.1.jar')
compile files('libs/log4j-1.2.16.jar')
compile files('libs/ma3api-asn-2.0.2.jar')
compile files('libs/ma3api-cmssignature-2.0.2.jar')
compile files('libs/ma3api-common-2.0.2.jar')
compile files('libs/ma3api-crypto-2.0.2.jar')
compile files('libs/ma3api-crypto-gnuprovider-2.0.2.jar')
compile files('libs/ma3api-infra-2.0.2.jar')
compile files('libs/ma3api-signature-2.0.2.jar')
compile files('libs/ma3api-smartcard-2.0.2.jar')
compile files('libs/ma3api-smartcard-android-2.0.2.jar')
compile files('libs/ma3api-smartcard-android-ccid-2.0.2.jar')
compile files('libs/slf4j-api-1.6.6.jar')
compile files('libs/sunpkcs11.jar')
compile files('libs/volley-1.0.0.jar')
}

任何解决方案? 预先感谢。

1 个答案:

答案 0 :(得分:-1)

在应用程序级别gradle文件中添加依赖项

defaultConfig {
   multiDexEnabled true
}

dependencies {
  compile'com.android.support:multidex:1.0.3'
}