AS 3.0加载iMobile报错

0 投票
使用Android Studio 3.0版本然后gradle版本是: 3.0.0-alpha3 编译报错,

Error:Error converting bytecode to dex:
Cause: class name (com/supermap/mapping/g) does not match path (com/supermap/mapping/G.class)
Error:com.android.dx.cf.iface.ParseException: class name (com/supermap/mapping/g) does not match path (com/supermap/mapping/G.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/supermap/mapping/g) does not match path (com/supermap/mapping/G.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/supermap/mapping/G.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.

网上搜索结果是由于 这个问题初步确定是因为gradle3.0.0及以后的版本在windows环境下,对混淆的包名大小写区分的问题
6月 13, 2017 分类:  359次浏览 | 用户: panjianbo (7 分)

1个回答

0 投票

从报错的信息看这个问题和SuperMap iMobile for Android产品没有关系,主要是开发环境的原因,我百度了一下,网上也有好多这类的问题和相关回答,你可以参考一下https://stackoverflow.com/questions/21674453/android-studio-gradle-error-with-top-level-exception

6月 14, 2017 用户: 王国新 名扬四海 (1,932 分)
...