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

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

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

所以还要去修改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()
    }
相关推荐
guoruijun_2012_42 小时前
fastadmin多个表crud连表操作步骤
android·java·开发语言
Winston Wood2 小时前
一文了解Android中的AudioFlinger
android·音频
一头小火烧3 小时前
flutter打包签名问题
flutter
sunly_4 小时前
Flutter:异步多线程结合
flutter
AiFlutter4 小时前
Flutter网络通信-封装Dio
flutter
B.-4 小时前
Flutter 应用在真机上调试的流程
android·flutter·ios·xcode·android-studio
有趣的杰克4 小时前
Flutter【04】高性能表单架构设计
android·flutter·dart
大耳猫9 小时前
主动测量View的宽高
android·ui
帅次12 小时前
Android CoordinatorLayout:打造高效交互界面的利器
android·gradle·android studio·rxjava·android jetpack·androidx·appcompat
枯骨成佛12 小时前
Android中Crash Debug技巧
android