欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

Android studio 切换flutterSDK之后报错以及解决办法

程序员文章站 2022-06-24 12:10:54
Windows系统上面修改了flutter sdk的环境变量地址之后Android studio上面运行flutter项目就会报错类似于:Could not read script XXX\flutter.gradle’ as it does not exist.还有这样:flutter:Warning! The ‘flutter’ tool you are currently running is from a different Flutter repository解决办法:1.首先把sett...

Windows系统上面修改了flutter sdk的环境变量地址之后Android studio上面运行flutter项目就会报错

类似于:
Could not read script XXX\flutter.gradle’ as it does not exist.

还有这样:flutter:Warning! The ‘flutter’ tool you are currently running is from a different Flutter repository

解决办法:
1.首先把settings里面的flutter sdk里面的路径改成现在最新的路径Android studio 切换flutterSDK之后报错以及解决办法
然后运行依旧会报错
2.看看错误,是这里,找不到那个文件Android studio 切换flutterSDK之后报错以及解决办法
点击跟上去看到是local.properties里面的问题

Android studio 切换flutterSDK之后报错以及解决办法

然后把local.properties文件里面的地址改成最新的版本的就可以了(这是需要操作的第二步)
Android studio 切换flutterSDK之后报错以及解决办法

然后就完了

本文地址:https://blog.csdn.net/C2496649361/article/details/107159556