Launching lib\main.dart on Nokia X6 in debug mode...
Initializing gradle...
Resolving dependencies...
Gradle task 'assembleDebug'... FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'com.android.support:support-v4' has different version for the compile (26.1.0) and runtime (27.1.1) 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 14s
Finished with error: Gradle task assembleDebug failed with exit code 1

解决方案:

在android/app/build.gradle,dependencies添加一行

dependencies {
//PART TO ADD implementation "com.android.support:support-v4:27.1.1"
}

网上还有一种方法:

subprojects {

    project.evaluationDependsOn(':app')
//[PART TO ADD START]
project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "27.1.0"
}
}
}
//[PART TO ADD END]
}

最新文章

  1. python table转空格
  2. angularJS实现二级联动查询以及自定义过滤器的使用
  3. Directory 与 DirectoryInfo 的区别
  4. ubuntu安装文件比较工具Meld
  5. 【转】【C#】C# 不常用关键字
  6. <%# Convert.ToDecimal(Eval("IMLognum")).ToString("F0") %>
  7. dvwa+xampp搭建显示乱码的问题:解决办法
  8. Webview的使用和注意事项
  9. Gradle version 2.10 is required. Current version is 2.8.
  10. 435. Non-overlapping Intervals
  11. Machine Learning 算法可视化实现2 - Apriori算法实现
  12. Python3基础-代码阅读系列—素数
  13. Android websock 应用
  14. [OpenCV] Install OpenCV 3.3 with DNN
  15. jquery基于form-data文件上传
  16. flume使用场景 flume与kafka的比较
  17. HBase HA的分布式集群部署(适合3、5节点)
  18. oracle中的字符串函数详解
  19. HDU 1969 Pie(二分,注意精度)
  20. 02-MariaDB主从安装SpringBoot整合MyBatis配置

热门文章

  1. 审计系统---paramiko模块学习
  2. matlab中关于函数句柄、feval函数以及inline函数的解析 (转)
  3. layer的alert图
  4. zabbix的日常监控-分布式监控(十)
  5. Log4net 使用之 日期字段格式化
  6. Mina使用总结(二)Handler
  7. IKVM.NET入门(2)
  8. taskset
  9. loli的搜索测试-4
  10. 上手 Kubernetes