这是错误日志:
任务:app:transformClassesWithDexBuilderForDebug com.android.builder.dexing.DexArchiveBuilderException:com.android.builder.dexing.DexArchiveBuilderException:无法处理C:\ User \ lenovo.gradle \ caches \ transforms-2 \ files-2.1 \ ea4133cb13233edf48fd09c8aeaa2352 \ jars \ classes。 在sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法)处 在sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 在sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 在java.lang.reflect.Constructor.newInstance(Constructor.java:423) 在java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593) 在java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677) 在java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:720) 在com.android.ide.common.internal.WaitableExecutor.waitForTasksWithQuickFail(WaitableExecutor.java:146) 在com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.transform(DexArchiveBuilderTransform.java:420) 在com.android.build.gradle.internal.pipeline.TransformTask $ 2.call(TransformTask.java:239) 在com.android.build.gradle.internal.pipeline.TransformTask $ 2.call(TransformTask.java:235) 在com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102) 在com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:230) 在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:103) 在org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:73) 在org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:41) 在org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter $ 4.run(ExecuteActionsTaskExecuter.java:338) 在org.gradle.internal.operations.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)处 在org.gradle.internal.operations.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)处 在org.gradle.internal.operations.DefaultBuildOperationExecutor $ 1.execute(DefaultBuildOperationExecutor.java:165) 在org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)处 在org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158) 在org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92) 在org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:327) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:312) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access $ 200(ExecuteActionsTaskExecuter.java:75) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter $ TaskExecution.execute(ExecuteActionsTaskExecuter.java:158) 在org.gradle.internal.execution.impl.steps.ExecuteStep.execute(ExecuteStep.java:46) 在org.gradle.internal.execution.impl.steps.CancelExecutionStep.execute(CancelExecutionStep.java:34)处 在org.gradle.internal.execution.impl.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:69) 在org.gradle.internal.execution.impl.steps.TimeoutStep.execute(TimeoutStep.java:49) 在org.gradle.internal.execution.impl.steps.CatchExceptionStep.execute(CatchExceptionStep.java:34) 在org.gradle.internal.execution.impl.steps.CreateOutputsStep.execute(CreateOutputsStep.java:49) 在org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:42) 在org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:28) 在org.gradle.internal.execution.impl.steps.CacheStep.executeWithoutCache(CacheStep.java:133) 在org.gradle.internal.execution.impl.steps.CacheStep.lambda $ execute $ 5(CacheStep.java:83) 在java.util.Optional.orElseGet(Optional.java:267) 在org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:82) 在org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:37) 在org.gradle.internal.execution.impl.steps.PrepareCachingStep.execute(PrepareCachingStep.java:33) 在org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:38) 在org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:23) 在org.gradle.internal.execution.impl.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:95) 在org.gradle.internal.execution.impl.steps.SkipUpToDateStep.lambda $ execute $ 0(SkipUpToDateStep.java:88) 在java.util.Optional.map(Optional.java:215) 在org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:52) 在org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36) 在org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:34) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:109) 在org.gradle.api.internal.tasks.execution.ResolveIncrementalChangesTaskExecuter.execute(ResolveIncrementalChangesTaskExecuter.java:84) 在org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:91)处 在org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionStateTaskExecuter.execute(ResolveBeforeExecutionStateTaskExecuter.java:74) 在org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) 在org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:109) 在org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67) 在org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute(ResolveAfterPreviousExecutionStateTaskExecuter.java:46)处 在org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:93) 在org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:45) 在org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:94) 在org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57) 在org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56) 在org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36) 在org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.executeTask(EventFiringTaskExecuter.java:63) 在org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.call(EventFiringTaskExecuter.java:49) 在org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.call(EventFiringTaskExecuter.java:46) 在org.gradle.internal.operations.DefaultBuildOperationExecutor $ CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416) 在org.gradle.internal.operations.DefaultBuildOperationExecutor $ CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)处 在org.gradle.internal.operations.DefaultBuildOperationExecutor $ 1.execute(DefaultBuildOperationExecutor.java:165) 在org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)处 在org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158) 在org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102) 在org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36) 在org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46) 在org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43) 在org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)处 在org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)处 在org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)处 在org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)处 在org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker $ 1.execute(DefaultPlanExecutor.java:134) 在org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker $ 1.execute(DefaultPlanExecutor.java:129) 在org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker.execute(DefaultPlanExecutor.java:202)处 在org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193) 在org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker.run(DefaultPlanExecutor.java:129) 在org.gradle.internal.concurrent.ExecutorPolicy $ CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) 在org.gradle.internal.concurrent.ManagedExecutorImpl $ 1.run(ManagedExecutorImpl.java:46) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617) 在org.gradle.internal.concurrent.ThreadFactoryImpl $ ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) 在java.lang.Thread.run(Thread.java:745) 引起原因:com.android.builder.dexing.DexArchiveBuilderException:无法处理C:\ User \ lenovo.gradle \ caches \ transforms-2 \ files-2.1 \ ea4133cb13233edf48fd09c8aeaa2352 \ jars \ classes.jar 在com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.java:909) 在com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.lambda $ convertToDexArchive $ 6(DexArchiveBuilderTransform.java:834) 在java.util.concurrent.ForkJoinTask $ AdaptedCallable.exec(ForkJoinTask.java:1424) 在java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) 在java.util.concurrent.ForkJoinPool $ WorkQueue.runTask(ForkJoinPool.java:1056) 在java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) 在java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) 引起原因:com.android.builder.dexing.DexArchiveBuilderException:解密时出错。 在com.android.builder.dexing.D8DexArchiveBuilder.getExceptionToRethrow(D8DexArchiveBuilder.java:124) 在com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:101) 在com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.java:904) ...另外6个 引起原因:com.android.tools.r8.CompilationFailedException:编译无法完成 在com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:70) 在com.android.tools.r8.utils.ExceptionUtils.withD8CompilationHandler(ExceptionUtils.java:43) 在com.android.tools.r8.D8.run(D8.java:94) 在com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:99) ...另外7个 由以下原因导致:com.android.tools.r8.utils.AbortException:错误:接口
com.google.android.gms.measurement.internal.zzcv(classpath class)
用作com.google.android.gms.measurement.AppMeasurement$Param
的超类。 在com.android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.java:89) 在com.android.tools.r8.utils.Reporter.fatalError(Reporter.java:60) 在com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:64) ...还有10个任务:app:transformClassesWithDexBuilderForDebug失败
失败:构建失败,并出现异常。
com.android.build.api.transform.TransformException:com.android.builder.dexing.DexArchiveBuilderException:com.android.builder.dexing.DexArchiveBuilderException:无法处理C:\ User \ lenovo.gradle \ caches \ transforms -2 \ files-2.1 \ ea4133cb13233edf48fd09c8aeaa2352 \ jars \ classes.jar
编辑:build.gradle文件
import com.google.gms.googleservices.GoogleServicesPlugin
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.veblr.videomate"
minSdkVersion 21
targetSdkVersion 28
versionCode 16
versionName "1.0.0.8"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
aaptOptions.cruncherEnabled = true
aaptOptions.useNewCruncher = false
vectorDrawables.useSupportLibrary = true
resConfigs "en"
}
buildTypes {
debug {
jniDebuggable true
multiDexEnabled true
}
release {
minifyEnabled false
///shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
//Other parameters
debuggable false
jniDebuggable false
renderscriptDebuggable false
pseudoLocalesEnabled false
zipAlignEnabled true
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
}
ext {
roomVersion = '1.0.0'
archLifecycleVersion = '1.1.0'
}
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'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/rxjava.properties'
exclude 'META-INF/XXX'
exclude 'META-INF/license/LICENSE.base64.txt'
exclude 'META-INF/rxjava.properties'
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
dexOptions {
jumboMode true
preDexLibraries = false
javaMaxHeapSize "12g" //specify the heap size for the dex process
}
}
afterEvaluate {
tasks.matching {
it.name.startsWith('dex')
}.each { dx ->
if (dx.additionalParameters == null) {
dx.additionalParameters = ['--multi-dex']
} else {
dx.additionalParameters += '--multi-dex'
}
}
}
repositories {
mavenCentral()
maven { url "https://jitpack.io"
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
maven{ url "https://adcolony.bintray.com/AdColony"}
maven { url 'https://maven.fabric.io/public'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.adcolony:sdk:3.3.0'
implementation 'com.google.ads.mediation:adcolony:3.2.1.1'
implementation 'com.google.android.material:material:1.0.0'
implementation "com.google.firebase:firebase-measurement-connector-
impl:17.0.5"
//noinspection GradleCompatible
implementation 'com.google.ads.mediation:facebook:4.27.0.0'
implementation 'com.facebook.android:audience-network-sdk:4.27.0'
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'com.danikula:videocache:2.7.0'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:retrofit:2.2.0'
implementation 'com.squareup.retrofit2:converter-gson:2.2.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.0.1'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.2.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
//noinspection GradleCompatible
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.firebase:firebase-messaging:17.4.0'
implementation 'com.google.firebase:firebase-crash:16.2.1'
implementation 'com.google.firebase:firebase-auth:16.2.0'
implementation 'com.firebaseui:firebase-ui-database:4.3.1'
implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
implementation 'org.piwik.sdk:piwik-sdk:2.0.0'
implementation 'com.android.support:multidex:1.0.3'
debugImplementation 'com.amitshekhar.android:debug-db:1.0.0'
// Room components
implementation 'android.arch.persistence.room:runtime:1.1.1'
annotationProcessor "android.arch.persistence.room:compiler:1.1.1"
androidTestImplementation 'android.arch.persistence.room:compiler:1.1.1'
// Lifecycle components
implementation 'android.arch.lifecycle:extensions:1.1.1'
annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
implementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
androidTestImplementation 'com.android.support:support-annotations:28.0.0'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation "android.arch.lifecycle:viewmodel:1.1.1"
implementation 'android.arch.navigation:navigation-fragment:1.0.0-rc02'
implementation 'android.arch.navigation:navigation-ui:1.0.0-rc02'
}
apply plugin: 'com.google.gms.google-services'
GoogleServicesPlugin.config.disableVersionCheck = true