當編譯出現如下問題(版本不兼容):
Android dependency 'com.android.support:support-fragment' has different version for the compile (25.3.1) and runtime (26.1.0) classpath. You should manually set the same version via DependencyResolution
如何解決 :
./gradlew app:dependencies > log_dependencies.txt
提取依賴的信息。
打開 log_dependencies.txt文件,查找26.1.0關鍵字。
當前使用的implementation 'com.android.support:appcompat-v7:25.3.1'
發現:account模塊中,所依賴模塊mvp的 25.3.1與26.1.0沖突。
解決方案:
1:mvp模塊中去掉所依賴的沖突項。
2:添加指定解決版本沖突的依賴項版本。