Small icon indicating copy to clipboard operation
Small copied to clipboard

编译插件的时候,百度地图报错,求解

Open wo327808864 opened this issue 8 years ago • 3 comments

  • [x] 我已阅读并理解 贡献指南,严格遵循其约定。

错误报告

Printing classes to [D:\workspace_git\EimSmall2\app.eim\build\outputs\mapping\release\dump.txt]... [app.eim] Strip aar classes... [ OK ] [app.eim] split R.class... [ OK ] Dex: Error converting bytecode to dex: Cause: PARSE ERROR: class name (com/baidu/platform/comapi/map/a) does not match path (com/baidu/platform/comapi/map/A.class) ...while parsing com/baidu/platform/comapi/map/A.class

PARSE ERROR: class name (com/baidu/platform/comapi/map/a) does not match path (com/baidu/platform/comapi/map/A.class) ...while parsing com/baidu/platform/comapi/map/A.class

1 error; aborting

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app.eim:transformClassesWithDexForRelease'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com. android.ide.common.process.ProcessException: Error while executing java process with main class com.android.dx.command.Main with arguments {--dex -- num-threads=4 --multi-dex --main-dex-list D:\workspace_git\EimSmall2\app.eim\build\intermediates\multi-dex\release\maindexlist.txt --output D:\works pace_git\EimSmall2\app.eim\build\intermediates\transforms\dex\release\folders\1000\1f\main D:\workspace_git\EimSmall2\app.eim\build\intermediates\tr ansforms\proguard\release\jars\3\1f\main.jar}

你做了什么?

执行了gradlew buildBundle -q

你期望的结果是什么?

正常编译插件

实际结果是什么?

编译失败

Small环境

1.3.0-beta5版本

Compile-time

  gradle-small plugin : 1.3.0-beta5版本 (project)
            small aar :  1.3.0-beta5版本 (project)
          gradle core : 3.3
       android plugin : 2.3.3
                   OS : windows```

### Bundles

|  type  |       name       |   PP   |          file           |    size    |
|--------|------------------|--------|-------------------------|------------|
|  host  |  app             |        |                         |            |
|  app   |  app.main        |  0x77  |  *_main.so (x86)        |  10.9 KB   |


<!-- 编译时环境,粘贴 ./gradlew small 输出结束 -->

<!-- 运行时环境,仅当运行时crash提供,编译就报错的删除掉下面这段 -->

### Runtime

Device : Samsung Nexus S SDK : Android 7.0 ABI : armeabi-v7a

wo327808864 avatar Jan 15 '18 11:01 wo327808864

Windows的文件系统默认是不区分大小写文件名的,例如相同的文件目录下A.txt和a.txt是不能同时存在的。应该是Small在编译过程中会将jar包解压到磁盘上,com/baidu/platform/comapi/map/A.class 覆盖了com/baidu/platform/comapi/map/a.class文件。

Ivonhoe avatar Jan 15 '18 13:01 Ivonhoe

@Ivonhoe 那怎么解决呢。大部分app应该都会用到百度地图的,但是在issues里面没找到相同的问题。

wo327808864 avatar Jan 16 '18 01:01 wo327808864

@galenlin 问下,您之前有处理过类似的问题吗?

wo327808864 avatar Jan 16 '18 03:01 wo327808864