天使漫步IT工作室

Android dependency 'com.android.support:multidex' has different version for the compile (1.0.2) and runtime (1.0.3) classpath


升级android stadio 3.1

今天好奇升级了下IDE,把android stadio从3.0.1升级到3.1,跟着就要求升级Gradle插件和java的版本。编译后发现报如下错:

Android dependency 'com.android.support:multidex' has different version for the compile (1.0.2) and runtime (1.0.3) classpath. You should manually set the same version via DependencyResolution

分析修复

Android stadio 3.1要求所有的compile api换成api 或者 implementation,implementation是为了解决编译依赖传递的问题,最终为了让开发者更加独立的设计各自的module,也将是不然模块间有强依赖传递。

这里把'com.android.support:multidex'的版本从1.0.2 将为 1.0.3 然后进行编译即可。

当前页面是本站的「Baidu MIP」版。查看和发表评论请点击:完整版 »