我只是违反了此皮棉检查:
Incompatible Gradle Versions ../../build.gradle: All
com.android.support libraries must use the exact same version
specification (mixing versions can lead to runtime crashes). Found
versions 25.3.1, 25.2.0. Examples include
com.android.support:animated-vector-drawable:25.3.1 and
com.android.support:support-v13:25.2.0
我的某些传递依赖项肯定不会更新为最新的支持版本.但是,我在我的应用程序build.gradle文件中以最新版本将支持库设置为第一级依赖项.我什至可以看到Gradle覆盖了所有这些依赖项:
$./gradlew app:dependencies | grep 25.2.0
| +--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v13:25.2.0
| | +--- com.android.support:support-annotations:25.2.0 -> 25.3.1
| | \--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| \--- com.android.support:design:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v13:25.2.0
| | +--- com.android.support:support-annotations:25.2.0 -> 25.3.1
| | \--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| \--- com.android.support:design:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v13:25.2.0
| | +--- com.android.support:support-annotations:25.2.0 -> 25.3.1
| | \--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| \--- com.android.support:design:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v13:25.2.0
| | +--- com.android.support:support-annotations:25.2.0 -> 25.3.1
| | \--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| \--- com.android.support:design:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v13:25.2.0
| | +--- com.android.support:support-annotations:25.2.0 -> 25.3.1
| | \--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| \--- com.android.support:design:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v13:25.2.0
| | +--- com.android.support:support-annotations:25.2.0 -> 25.3.1
| | \--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| \--- com.android.support:design:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v13:25.2.0
| | +--- com.android.support:support-annotations:25.2.0 -> 25.3.1
| | \--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| \--- com.android.support:design:25.2.0 -> 25.3.1 (*)
解决方法:
它并没有覆盖每个依赖项:com.android.support:support-v13:25.2.0未更新为25.3.1.
您应该添加编译“ com.android.support:support-v13:25.3.1”,以确保所有内容都在同一版本上.