Error:Error converting bytecode to dex: Cause: not found: Ljava/lang/Object;

Error:Error converting bytecode to dex: Cause: not found: Ljava/lang/Object;

我尝试 android 3.0。我将 android 项目升级到 android studio 3.0 之后我无法 运行 我的项目,我有这个错误。我使用 MultiDex 并使用 java 8.

这是我的 build.gradle

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile "com.android.support:appcompat-v7:${project.APP_COMPACT_VERTION}"
    compile "com.android.support:cardview-v7:${project.APP_COMPACT_VERTION}"
    compile "com.android.support:design:${project.APP_COMPACT_VERTION}"
    testCompile 'junit:junit:4.12'
    compile project(':ucrop')
    compile 'com.github.rey5137:material:1.2.2'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.daimajia.easing:library:1.0.1@aar'
    compile 'com.daimajia.androidanimations:library:1.1.3@aar'
    compile 'de.hdodenhof:circleimageview:2.0.0'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.intuit.sdp:sdp-android:1.0.3'
    compile 'com.google.firebase:firebase-messaging:9.2.1'
    compile 'com.google.firebase:firebase-analytics:9.2.1'
    compile 'com.google.firebase:firebase-crash:9.2.1'
    compile 'com.google.firebase:firebase-core:9.2.1'
    compile 'com.kyleduo.switchbutton:library:1.4.1'
    compile 'com.alirezaafkar:toolbar:1.0.9'
    compile 'net.simonvt.menudrawer:menudrawer:3.0.6'
    compile 'com.loopj.android:android-async-http:1.4.9'
    compile 'me.leolin:ShortcutBadger:1.1.10@aar'
    compile 'com.larswerkman:HoloColorPicker:1.5'
    compile 'com.github.lsjwzh.RecyclerViewPager:lib:v1.1.1'
    compile project(path: ':countrypicker')
    compile 'joda-time:joda-time:2.9.7'
    compile 'com.redmadrobot:inputmask:2.2.1'
    compile project(path: ':swipestack')
    compile 'me.relex:circleindicator:1.2.2@aar'
    //db orm
    annotationProcessor 'com.github.Raizlabs.DBFlow:dbflow-processor:4.0.0-beta5'
    compile 'com.github.Raizlabs.DBFlow:dbflow-core:4.0.0-beta5'
    compile 'com.github.Raizlabs.DBFlow:dbflow:4.0.0-beta5'
    compile 'net.sourceforge.streamsupport:streamsupport:1.5.3'
    compile 'com.android.support:multidex:1.0.1'

}

这是我的编译错误

Warning:File for type 'com.raizlabs.android.dbflow.config.PoolamDBPOOLAM_DB_Database' created in the last round will not be subject to annotation processing.
Warning:File for type 'com.raizlabs.android.dbflow.config.GeneratedDatabaseHolder' created in the last round will not be subject to annotation processing.        
Error:Error converting bytecode to dex:
    Cause: not found: Ljava/lang/Object;
    Error:com.android.dex.util.ExceptionWithContext: not found: Ljava/lang/Object;
    Error:  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    Error:  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    Error:  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    Error:  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    Error:  at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
    Error:  at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
    Error:  at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:720)
    Error:  at com.android.ide.common.internal.WaitableExecutor.waitForTasksWithQuickFail(WaitableExecutor.java:146)
    Error:  at com.android.builder.dexing.DexArchiveBuilder.processOutputs(DexArchiveBuilder.java:110)
    Error:  at com.android.builder.dexing.DexArchiveBuilder.convert(DexArchiveBuilder.java:91)
    Error:  at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransformCallable.lambda$cacheMissAction[=11=](DexArchiveBuilderTransformCallable.java:236)
    Error:  at com.android.builder.utils.FileCache.lambda$createFile(FileCache.java:260)
    Error:  at com.android.builder.utils.FileCache.lambda$null(FileCache.java:443)
    Error:  at com.android.builder.utils.SynchronizedFile.doActionWithMultiProcessLocking(SynchronizedFile.java:265)
    Error:  at com.android.builder.utils.SynchronizedFile.write(SynchronizedFile.java:232)
    Error:  at com.android.builder.utils.FileCache.lambda$queryCacheEntry(FileCache.java:415)
    Error:  at com.android.builder.utils.SynchronizedFile.doActionWithMultiProcessLocking(SynchronizedFile.java:265)
    Error:  at com.android.builder.utils.SynchronizedFile.read(SynchronizedFile.java:215)
    Error:  at com.android.builder.utils.FileCache.queryCacheEntry(FileCache.java:391)
    Error:  at com.android.builder.utils.FileCache.createFile(FileCache.java:273)
    Error:  at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransformCallable.getFromCacheAndCreateIfMissing(DexArchiveBuilderTransformCallable.java:185)
    Error:  at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransformCallable.call(DexArchiveBuilderTransformCallable.java:147)
    Error:  at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransformCallable.call(DexArchiveBuilderTransformCallable.java:53)
    Error:  at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
    Error:  at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    Error:  at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    Error:  at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    Error:  at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
    Error:Caused by: com.android.dex.util.ExceptionWithContext: not found: Ljava/lang/Object;
    Error:  at com.android.dex.util.ExceptionWithContext.withContext(ExceptionWithContext.java:45)
    Error:  at com.android.dx.dex.file.DebugInfoItem.place0(DebugInfoItem.java:76)
    Error:  at com.android.dx.dex.file.OffsettedItem.place(OffsettedItem.java:242)
    Error:  at com.android.dx.dex.file.MixedItemSection.placeItems(MixedItemSection.java:311)
    Error:  at com.android.dx.dex.file.DexFile.toDex0(DexFile.java:544)
    Error:  at com.android.dx.dex.file.DexFile.toDex(DexFile.java:215)
    Error:  at com.android.builder.dexing.DexArchiveBuilderCallable.call(DexArchiveBuilderCallable.java:76)
    Error:  at com.android.builder.dexing.DexArchiveBuilderCallable.call(DexArchiveBuilderCallable.java:43)
    Error:  ... 5 more
    Error:Caused by: java.lang.IllegalArgumentException: not found: Ljava/lang/Object;
    Error:  at com.android.dx.dex.file.TypeIdsSection.indexOf(TypeIdsSection.java:167)
    Error:  at com.android.dx.dex.file.TypeIdsSection.indexOf(TypeIdsSection.java:185)
    Error:  at com.android.dx.dex.file.DebugInfoEncoder.emitTypeIndex(DebugInfoEncoder.java:673)
    Error:  at com.android.dx.dex.file.DebugInfoEncoder.emitLocalStart(DebugInfoEncoder.java:704)
    Error:  at com.android.dx.dex.file.DebugInfoEncoder.emitLocalsAtAddress(DebugInfoEncoder.java:326)
    Error:  at com.android.dx.dex.file.DebugInfoEncoder.convert0(DebugInfoEncoder.java:227)
    Error:  at com.android.dx.dex.file.DebugInfoEncoder.convert(DebugInfoEncoder.java:162)
    Error:  at com.android.dx.dex.file.DebugInfoItem.encode0(DebugInfoItem.java:185)
    Error:  at com.android.dx.dex.file.DebugInfoItem.encode(DebugInfoItem.java:141)
    Error:  at com.android.dx.dex.file.DebugInfoItem.place0(DebugInfoItem.java:73)
    Error:  ... 11 more
    Error:...while placing debug info for java8.util.ArrayPrefixHelpers$DoubleCumulateTask.compute:()V
    Error:...while placing com.android.dx.dex.file.DebugInfoItem@703daa92
    Error:...while writing section 10
    Error:Execution failed for task ':app:transformClassesWithDexBuilderForDevDebug'.
    > com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.builder.utils.FileCache$FileCreatorException: com.android.builder.dexing.DexArchiveBuilder$DexBuilderException: Unable to convert input to dex archive.

问题是 android 预览版和 gradle 版。 将 android studio 更改为最新版本 3.0 canary 5 将 gradle 版本更改为

 classpath 'com.android.tools.build:gradle:3.0.0-alpha5'