Flutter 运行模拟器黑(白)屏问题

运行,一直 Initializing gradle

找到文件:

D:\flutter\packages\flutter_tools\gradle\flutter.gradle

注释google() 和 jcenter()

添加代码:

maven { url 'https://maven.aliyun.com/repository/google' }

maven { url 'https://maven.aliyun.com/repository/jcenter' }

maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }

原因就是,中国访问不了google,改为使用镜像访问


run->Edit Configurations 里面添加--enable-software-rendering

你可能感兴趣的:(Flutter 运行模拟器黑(白)屏问题)