Не удалось выполнить задачу ': app: transformClassesWithDexBuilderForDebug'. : не могу создать мое приложение - PullRequest
0 голосов
/ 04 апреля 2019

Это журнал ошибок:

Задача: app: transformClassesWithDexBuilderForDebug com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: не удалось обработать C: \ User \ lenovo.gradle \ caches \ transforms-2 \ files-2.1 \ ea4133cb13233edf48fd09c8aesars.2 at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (собственный метод) at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62) at 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) at sun.reflect.NativeMethodAccessorImpl.invoke0 (собственный метод) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at 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 (Необязательно.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.jild:gra.bu.infor.in).DexArchiveBuilderTransform.launchProcessing (DexArchiveBuilderTransform.java:904) ... ... еще 6 причин: com.android.tools.r8.CompilationFailedException: не удалось завершить компиляцию в com.android.tools.r8.utils.ExceptionUtils.withsJava: 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 FAILED

FAILURE: сборка завершилась неудачей с исключением.

  • Что пошло не так: выполнение задачи не выполнено: 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
...