使用Realm Plateform编译项目失败

时间:2018-01-09 09:05:38

标签: android kotlin realm realm-mobile-platform

我有一个很好地运行Realm的项目。我想将我的应用程序与Realm Object Server同步以进行一些调查,但我还没有成功完成编译。

项目级构建脚本:

buildscript {
    ext.kotlin_version = '1.2.10'

     dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath "io.realm:realm-gradle-plugin:4.3.1"
     }
}

这里是app level sub build.gradle about realm

apply plugin: 'realm-android'

allprojects {
    repositories {
        maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
    }
}

android{
    packagingOptions {
        pickFirst 'lib/x86/librealm-jni.so'
    }

}

dependencies {
    implementation "com.github.vicpinm:krealmextensions:2.0.0-beta2"
  }

realm {
    syncEnabled = true
}

我用kotlin

使用D8 gradle.properties

android.enableD8=true

这是stacktrace

java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/507.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/513.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/511.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/500.jar, /.../Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/202.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/264.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/369.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/1.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/153.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/39.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/281.jar

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
    at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
    at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:720)
    at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:397)
    at com.android.build.gradle.internal.transforms.DexMergerTransform.transform(DexMergerTransform.java:225)
    at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:222)
    at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:218)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
    at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:213)
    at sun.reflect.GeneratedMethodAccessor3945.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/507.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/513.jar,..., /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/141.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/291.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/124.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/310.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/380.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/20.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/89.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/408.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/231.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/220.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/357.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/453.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/468.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/470.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/68.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/178.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/74.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/391.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/118.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/479.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/229.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/374.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/91.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/246.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/60.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/180.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/172.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/156.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/36.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/245.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/431.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/342.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/253.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/438.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/261.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/164.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/350.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/28.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/268.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/67.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/365.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/59.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/318.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/187.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/349.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/446.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/284.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/83.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/237.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/415.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/52.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/486.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/400.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/311.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/99.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/117.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/478.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/21.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/230.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/206.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/299.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/388.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/213.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/292.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/302.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/125.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/469.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/373.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/407.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/92.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/390.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/196.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/75.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/309.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/221.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/228.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/277.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/326.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/110.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/471.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/179.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/13.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/454.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/287.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/473.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/43.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/86.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/94.jar, /Users/afaucogney/Documents/Projects/Company/Poc/app/build/intermediates/transforms/dexBuilder/devPortrait/debug/422.jar, /

0 个答案:

没有答案