解决 constraint-layout' has different version for the compile (1.1.2) and runtime (1.1.3) classpath.

android studio 报错Messages:

Error:FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'com.android.support.constraint:constraint-layout' has different version for the compile (1.1.2) and runtime (1.1.3) classpath. You should manually set the same version via DependencyResolution

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s

--------------------------------------------------------------------

报错:Android dependency 'com.android.support.constraint:constraint-layout' has different version for the compile (1.1.2) and runtime (1.1.3) classpath.

--------------------------------------------------------------------

解决方法:

找到对应模块的build.gradle中的dependencies {}中,其中莫名加了一条

implementation 'com.android.support.constraint:constraint-layout:1.1.3'

删除掉这条语句,即可。

 

你可能感兴趣的:(android)