• flutter问题汇总


    一直卡在building a flutter app for general distribution;

    AS Message窗口显示 依赖下载失败:

    1、修改仓库地址的配置:android/build.gradle

      repositories {
            maven { url 'https://download.flutter.io' }
            maven { url "https://maven.aliyun.com/repository/public" }
            maven { url "https://maven.aliyun.com/repository/central" }
            maven { url "https://maven.aliyun.com/repository/jcenter" }
            maven { url "https://maven.aliyun.com/repository/google" }
            maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
    //        maven { url "https://maven.aliyun.com/repository" }
            mavenLocal()
            mavenCentral()
    //        google()
    //        jcenter()
    //        gradlePluginPortal()
    //        maven { url 'https://repo1.maven.org/maven2/' }
    //        maven { url 'https://jitpack.io' }
       }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16

    2、因为setting.gradle中有这个配置:

    apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
    
    • 1

    所以还要去修改flutter-tools中的配置:
    …\FlutterSdk\flutter_windows_3.0.5\packages\flutter_tools\gradle\flutter.gradle

    repositories {
            maven { url "https://maven.aliyun.com/repository/public" }
            maven { url "https://maven.aliyun.com/repository/central" }
            maven { url "https://maven.aliyun.com/repository/jcenter" }
            maven { url "https://maven.aliyun.com/repository/google" }
            maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
            google()
            mavenCentral()
        }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9

    注意:3.13 以上的版本,需要修改下面两个文件:

    flutter_windows_3.13.2\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy
    flutter_windows_3.13.2\packages\flutter_tools\gradle\resolve_dependencies.gradle

    Error: A value of type ‘AbstractNode?’ can’t be assigned to a variable of type ‘RenderObject?’. #22

    使用 flutter sdk 3.13 以版本;

    使用:

    高版本的Gradle配置:

    maven { url = uri("https://maven.aliyun.com/repository/public") }
     maven { url = uri("https://maven.aliyun.com/repository/central") }
     maven { url = uri("https://maven.aliyun.com/repository/jcenter") }
     maven { url = uri("https://maven.aliyun.com/repository/google") }
     maven { url = uri("https://maven.aliyun.com/repository/gradle-plugin") }
    
    • 1
    • 2
    • 3
    • 4
    • 5
  • 相关阅读:
    jQuery学习:基本选择器
    等保: Postgresql配置ssl链接
    制造商面临的常见网络威胁是什么,他们如何保护自己
    RabbitMQ 教你如何创建虚拟主机
    Moonbeam网络维护模式(Maintenance Mode)解读
    YOLOv5和YOLOv7环境(GPU)搭建测试成功
    BUUCTF----[极客大挑战 2019]HardSQL
    Qt中的Resource
    php lcg_value与mt_rand生成0~1随机小数的效果比较
    arduino uno+LCD12864(ST7735S)+蓝牙模块实现贪吃蛇
  • 原文地址:https://blog.csdn.net/zhijiandedaima/article/details/133818566