wequick / Small

A small framework to split app into small parts
http://code.wequick.net/Small
Apache License 2.0
5.05k stars 1.11k forks source link

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

Open wo327808864 opened 6 years ago

wo327808864 commented 6 years ago

错误报告

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.

你做了什么?

执行了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

Ivonhoe commented 6 years ago

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

wo327808864 commented 6 years ago

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

wo327808864 commented 6 years ago

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