公司app 从兼容Android 8.0 升级兼容9.0

当筵意气临九霄,星离雨散不终朝。这篇文章主要讲述公司app 从兼容Android 8.0 升级兼容9.0相关的知识,希望能为你提供帮助。
遇到的问题
1.All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.3.0, 23.4.0. Examples includecom.android.support:animated-vector-drawable:25.3.0  andcom.android.support:design:23.4.0more...  (Ctrl+F1)
 
解决办法:
 在build.gradle 中替换以前的
旧:

compile ‘com.android.support:design:25.3.0‘
compile ‘com.android.support:appcompat-v7:25.3.0‘

新:

compile ‘com.android.support:support-v4:28.0.0‘
compile ‘com.android.support:design:28.0.0‘
compile ‘com.android.support:appcompat-v7:28.0.0‘

2.

error:Error converting bytecode to dex: (字节码转dex错误    造成原因:com.android.dex下抛出了Dex下标越界异常:不能新下标70021合并到一个 非jumbo的结构)
Cause: com.android.dex.DexIndexOverflowException: Cannot merge new index 70021 into a non-jumbo instruction!
Error:Execution failed for task ‘:app:transformClassesWithDexForDebug‘.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException


解决办法:
【公司app 从兼容Android 8.0 升级兼容9.0】在模块的build.gradle 文件中的加上:
android { dexOptions { jumboMode true } } 

    推荐阅读