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]
}

Flutter - > Android dependency 'com.android.support:support-v4' has different version for the compile (26.1.0) and runtime (27.1.1) classpath.的更多相关文章

  1. Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app

    出现的问题: Error:Execution failed for task ':app:preDebugAndroidTestBuild'.> Conflict with dependency ...

  2. Android dependency has different version.You should manually set the same version via DependencyReso

    有时候导入一些module时,会出现以下问题 Android dependency 'com.android.support:support-v4' has different version for ...

  3. 解决Android Studio Conflict with dependency 'com.android.support:support-annotations'报错

    解决Android Studio Conflict with dependency 'com.android.support:support-annotations'报错 在Android Studi ...

  4. 【转】你是不是也被Android Private Libraries、Referenced Libraries、android Dependency搞晕了~~

    一.v4.v7.v13的作用和用法 1.Android Support V4, V7, V13是什么? 本质上就是三个java library. 2.为什么要有support库?   是为了解决软件的 ...

  5. Conflict with dependency 'com.android.support:support-annotations' in project ':xxx'. Resolved versions for app (25.4.0) and test app (27.1.1) differ 问题解决

    Conflict with dependency 'com.android.support:support-annotations' in project ':xxx'. Resolved versi ...

  6. [Android]官网《Testing Support Library》中文翻译

    以下内容为原创,欢迎转载,转载请注明 来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/5048524.html 翻译自 Android Develope ...

  7. Android 如何在Eclipse中查看Android API源码 及 support包源码

    当我们阅读android API开发文档时候,上面的每个类,以及类的各个方法都是已经写好的方法和控件,可是我们只是在搬来使用,不知道它的原理,它是如何被实现的.android系统是开源的,所以谷歌官方 ...

  8. 【转】Android 如何在Eclipse中查看Android API源码 及 support包源码

    原文网址:http://blog.csdn.net/vipzjyno1/article/details/22954775 当我们阅读android API开发文档时候,上面的每个类,以及类的各个方法都 ...

  9. Android 自己实现 NavigationView [Design Support Library(1)]

    转载请标明出处: http://blog.csdn.net/lmj623565791/article/details/46405409: 本文出自:[张鸿洋的博客] 一.概述 Google I/O 2 ...

随机推荐

  1. 静态代码分析工具sonarqube+sonar-runner的安装配置及使用

    配置成功后的代码分析页面: 可以看到对复杂度.语法使用.重复度等等都做了分析,具体到了每一个方法和每一句代码. 四种使用方式: sonarqube + sonar-runner sonarqube + ...

  2. Python初学者第二十二天 函数进阶(1)

    22day 1.函数命名空间: 2.函数作用域的查找顺序:LEGB locals->enclosing function ->globals ->_builtins_ a.local ...

  3. Linux at命令详解

    at 只能执行一次,在一个指定的时间执行一个指定任务,只能执行一次,且需要开启atd进程 anacron: 适合于非 7*24 类型的服务器,以天为周期或者在系统开机后执行任务的工作 它会定时检测服务 ...

  4. fun()()() ---- 函数的嵌套

    结果--"嘿嘿"

  5. Data Compression

    数据压缩 introduction 压缩数据可以节省存储数据需要的空间和传输数据需要的时间,虽然摩尔定律说集成芯片上的晶体管每 18-24 个月翻一倍,帕金森定律说数据会自己拓展来填满可用空间,但数据 ...

  6. Alpha 冲刺报告(2/10)

    Alpha 冲刺报告(2/10) 队名:洛基小队 团队困难汇总:在开始正式编码的时候遇到了很严重的问题,Cocos Creator的教程过少,之前浏览的官网上的教程以为很齐全,但是在最重要的脚本方面还 ...

  7. exits, in, left join性能比较

    exits  in left join性能比较 ,笔者使用的是MYSQL数据库,这三个关键字方法在其他的关系数据库里也是大同小异,如果各种有兴趣,自行比较. 我这里有一个249_account 表,总 ...

  8. [李居丽][다이아몬드][Diamond]

    歌词来源:http://music.163.com/#/song?id=484056974 作曲 : Damon Sharpe/JOHN HO/JEFF SHUM [作曲 : Damon Sharpe ...

  9. spring中MessageSource的配置使用方法2--ReloadableResourceBundleMessageSource【转】

    本文转载仅供自己学习收录,不做任何商业用途,如有需要可访问原地址:http://blog.csdn.net/qyf_5445/article/details/8124362 如何在spring mvc ...

  10. 1202. [HNOI2005]狡猾的商人【贪心 或 并查集】

    Description 刁姹接到一个任务,为税务部门调查一位商人的账本,看看账本是不是伪造的.账本上记录了n个月以来的收入情况,其中第i 个月的收入额为Ai(i=1,2,3...n-1,n), .当 ...