Я только что добавил Realm в свой проект, который раньше работал нормально.После добавления он начал выбрасывать при сборке:
FAILURE: сборка не удалась с исключением.
org.gradle.api.tasks.TaskExecutionException: выполнение не выполненодля задачи ': app: transformClassesWithDexBuilderForDebug'.в org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions (ExecuteActionsTaskExecuter.java:103) в org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute:gra.gra..api.internal..tasks.execution.ResolveTaskOutputCachingStateExecuter.execute (ResolveTaskOutputCachingStateExecuter.java:54) в org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute.a.as.gra..SkipEmptySourceFilesTaskExecuter.execute (SkipEmptySourceFilesTaskExecuter.java:101) в org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute (FinalizeInputFileProgra.jpg) org.jpg.api.internal..tasks.execution..ExecuteAtMostOnceTaskExecuter.execute (ExecuteAtMostOnceTaskExecuter.java:43) в org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute (CatchExceptionTaskExecuter.java:34Texas.Funk.grat.DefaultTaskGraphExecuter.java:256) в 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.inefBackUgnв org.gradle.execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorker.execute (DefaultTaskGraphExecuter.java:249) в org.gradle.execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorktion.gras.ecuas.grag.jg ().DefaultTaskPlanExecutor $ TaskExecutorWorker.processTask (DefaultTaskPlanExecutor.java:123) в org.gradle.execution.taskgraph.DefaultTaskPlanExecutor $ TaskExecutorWorker.access $ 200 (DefaultTaskPlan_Exception(DefaultTaskPlanExecutor.java:104) в org.gradle.execution.taskgraph.DefaultTaskPlanExecutor $ TaskExecutorWorker $ 1.execute (DefaultTaskPlanExecutor.java:98) в org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute (DefaultTaskExecutionPlan.java:663) в org.gradle.execution.taskgraph.DefaultTaskExecutionTasas.kjorg.gradle.execution.taskgraph.DefaultTaskPlanExecutor $ TaskExecutorWorker.run (DefaultTaskPlanExecutor.java:98)в org.gradle.internal.concurrent.ExecutorPolicy $ CatchAndRecordFailures.onExecute (ExecutorPolicy.java:63) в org.gradle.internal.concurrent.ManagedExecutorImpl $ 1.run (ManagedExecutorImpl.java:46til.pol.runWorker (ThreadPoolExecutor.java:1142) в java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java:617) в org.gradle.internal.concurrent.ThreadFactoryImpl $ ManagedThreadRunnablejFl) в jun.lang.Thread.run (Thread.java:745) ....
С этим исключением времени выполнения:
java.lang.RuntimeException: com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException в 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:230) в sun.reflect.GeneratedMethodAccessor989.invoke (Неизвестный источник) в sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) в java.lang.reflect.Method.invoke (Method.java:498) в org.Mrein.grain.grad.вызывать (JavaMethod.java:73) в org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute (IncrementalTaskAction.java:50) в org.gradle.api.internal.project.taskfactory.StandardTaskActionAction.Java: 39) в org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute (StandardTaskAction.java:26) в org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter $ 1.run (ExecuteAtersjk).progress.DefaultBuildOperationExecutor.execute (DefaultBuildOperationExecutor.java:199) по адресу org.gradle.internal.progress.DefaultBuildOperationExecutor.run (DefaultBuildOperationExecutor.java:110) по адресу org.gradle.api.internal.tasks.execu.TecT.ExecuteAction ()113) по адресу org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions (ExecuteActionsTaskExecuter.java:95) по адресу org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execujExaster.ecute.gradle.api.internal.tasks.execution..internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute (ResolveTaskOutputCachingStateExecuter.java:54) в org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute (Проверка)uter.java:59) в org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute (SkipEmptySourceFilesTaskExecuter.java:101) в org.gradle.api.internal.tasks.executionTex.FileTin44) в org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute (CleanupStaleOutputsExecuter.java:91) в org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskArt.Extek.Extek..gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute (SkipTaskWithNoActionsExecuter.java:59) в org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.Ok.IxtFextex.Exteter.exiв org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute (ExecuteAtMostOnceTaskExecuter.java:43) в org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter:ex.jas.jas ().execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorker $ 1.run (DefaultTaskGraphExecuter.java:256) в org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute $RunnableBuildOperationWorker.execute (DefaultBuildOperationExecutor.java:328) по адресу org.gradle.internal.progress.DefaultBuildOperationExecutor.execute (DefaultBuildOperationExecutor.java:199) по адресу org.gradle.internal.progress.DefaultBuserOunExaction.gradle.execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorker.execute (DefaultTaskGraphExecuter.java:249) в org.gradle.execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorker.execute (DefaultTaskGraphExecuter.java:238) в org.gradle.execution.taskgraph.DefaultTaskPlanExecutor $ TaskExecutorWorker.processTask (DefaultTaskPlanExcletcase_ExecTackSecutor.Game_Exception)(DefaultTaskPlanExecutor.java:79) по адресу org.gradle.execution.taskgraph.DefaultTaskPlanExecutor $ TaskExecutorWorker $ 1.execute (DefaultTaskPlanExecutor.java:104) по адресу org.gradle.execution.taskgraph.DefaultTasorkExececec.Exec.TaskExecutorWorker.run (DefaultTaskPlanExecutor.java:98) в 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.u.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java:617) в org.gradle.internal.concurrent.ThreadFactoryImpl $ ManagedThreadRunnable.run (ThreadFactoryImpl.java:55) в java.lang.Thread.run (Thread.java6):*
Вот мое Gradle приложение:
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "goodweather.com.goodweather"
minSdkVersion 19
targetSdkVersion 28
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
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 'com.android.support:multidex:1.0.3'
//Dagger 2
implementation 'com.google.dagger:dagger:2.16'
implementation 'com.google.dagger:dagger-android-support:2.16'
annotationProcessor 'com.google.dagger:dagger-compiler:2.16'
testAnnotationProcessor 'com.google.dagger:dagger-compiler:2.16'
//RxJava2
implementation "io.reactivex.rxjava2:rxjava:2.2.2"
implementation "io.reactivex.rxjava2:rxandroid:2.0.1"
// Retrofit 2
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
// OkHTTP
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.okio:okio:1.14.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
//Glide
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
//Gson
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
//ButterKnife
implementation 'com.jakewharton:butterknife:9.0.0-rc1'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc1'
//Moxy
implementation 'com.arello-mobile:moxy-android:1.5.5'
implementation 'com.arello-mobile:moxy-app-compat:1.5.5'
annotationProcessor 'com.arello-mobile:moxy-compiler:1.5.5'
//Lombok
compileOnly 'org.projectlombok:lombok:1.18.4'
annotationProcessor 'org.projectlombok:lombok:1.18.4'
//SearchView
implementation 'com.miguelcatalan:materialsearchview:1.4.0'
// Logging
implementation 'com.jakewharton.timber:timber:4.6.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
}
Project Gradle:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "io.realm:realm-gradle-plugin:5.8.0"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Я уже перепробовал много решений, которые работают для кого-то другого, но не для меня.