File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 3
3
4
4
### 接入步骤
5
5
6
- 1 . build.gradle配置
6
+ 1 . build.gradle配置,不再需要引用官方的MultiDex库
7
7
```
8
+ allprojects {
9
+ repositories {
10
+ ...
11
+ maven { url 'https://jitpack.io' }
12
+ }
13
+ }
8
14
15
+ dependencies {
16
+ implementation 'com.github.zhuozp:ComPactMultiDex:v1.0.0'
17
+ }
18
+
19
+ defaultConfig {
20
+ // 加入multiDexEnabled允许多dex打包
21
+ multiDexEnabled true
22
+ multiDexKeepFile file('maindexlist.txt')
23
+ }
9
24
```
10
25
11
- 2 . 查看路径下buid/intermediates/legacy_multidex_main_dex_list/release/mainDexList.txt, 若没有ComPactMultiDex相关的类,则加入下面的类,主要是为了确保主dex有包含到
26
+ 2 . 创建mianDexList.txt文件(同工程build.gradle同目录),查看路径下buid/intermediates/legacy_multidex_main_dex_list/release/mainDexList.txt, 若没有ComPactMultiDex相关的类,则加入下面的类到创建的mianDexList.txt文件中,主要是为了确保主dex有包含到
27
+
12
28
```
13
29
com/gibbon/compactmultidex/ConcurrentMultiDexExtractor$ExtractCallable.class
14
30
com/gibbon/compactmultidex/ConcurrentMultiDexExtractor$ZipEntryGroup.class
You can’t perform that action at this time.
0 commit comments