项目中加入百度地图,从android studio 2.3.2 升级到Android studio 3.0 canary 4,遇到的问题

时间:2022-12-27 19:10:04
Information:Gradle tasks [:app:assembleDebug]
Warning:Ignoring InnerClasses attribute for an anonymous inner class
Error:Error converting bytecode to dex:
Cause: class name (com/baidu/platform/comapi/map/c) does not match path (com/baidu/platform/comapi/map/C.class)
Error:com.android.dx.cf.iface.ParseException: class name (com/baidu/platform/comapi/map/c) does not match path (com/baidu/platform/comapi/map/C.class)
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$0(DexArchiveBuilderTransformCallable.java:236)
Error: at com.android.builder.utils.FileCache.lambda$createFile$1(FileCache.java:260)
Error: at com.android.builder.utils.FileCache.lambda$null$5(FileCache.java:443)
Error: at com.android.builder.utils.SynchronizedFile.doActionWithSingleProcessLocking(SynchronizedFile.java:291)
Error: at com.android.builder.utils.SynchronizedFile.write(SynchronizedFile.java:234)
Error: at com.android.builder.utils.FileCache.lambda$queryCacheEntry$6(FileCache.java:415)
Error: at com.android.builder.utils.SynchronizedFile.doActionWithSingleProcessLocking(SynchronizedFile.java:291)
Error: at com.android.builder.utils.SynchronizedFile.read(SynchronizedFile.java:217)
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.dx.cf.iface.ParseException: class name (com/baidu/platform/comapi/map/c) does not match path (com/baidu/platform/comapi/map/C.class)
Error: at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:529)
Error: at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
Error: at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
Error: at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
Error: at com.android.builder.dexing.DexArchiveBuilderCallable.parseClass(DexArchiveBuilderCallable.java:86)
Error: at com.android.builder.dexing.DexArchiveBuilderCallable.call(DexArchiveBuilderCallable.java:70)
Error: at com.android.builder.dexing.DexArchiveBuilderCallable.call(DexArchiveBuilderCallable.java:43)
Error: ... 5 more
Error:...while parsing com/baidu/platform/comapi/map/C.class
Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> 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.
Information:BUILD FAILED in 8s
Information:41 errors
Information:1 warning
Information:See complete output in console

2 个解决方案

#1


 看看混淆文件内容是否和以前一样

#2


本来是android studio 3.0 canary 1 的,手贱点了update升到canary 4,然后就死活运行不起来了。
不清楚什么是混淆文件,汗汗汗。。。
换回canary 1,就可以了。晕呐。

#1


 看看混淆文件内容是否和以前一样

#2


本来是android studio 3.0 canary 1 的,手贱点了update升到canary 4,然后就死活运行不起来了。
不清楚什么是混淆文件,汗汗汗。。。
换回canary 1,就可以了。晕呐。