解决:Could not get unknown property 'android' for project ':fluttertoast' of type org.gradle.api.Project

I had this problem with :path_provider & aapt2-proto and fix it in this way:

in project-folder/gradle/wrapper/gradle-wrapper.properties

change this:

distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip

to this:

distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip

and then in project-folder/buil.gradle

change this:

classpath 'com.android.tools.build:gradle:3.5.0'

to this:

classpath 'com.android.tools.build:gradle:4.1.1'

and then run this command

flutter clean

build or run your project, good luck.

posted @   技术研究与问题解决  阅读(6371)  评论(0编辑  收藏  举报
编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术
· .NET周刊【3月第1期 2025-03-02】
历史上的今天:
2020-05-08 nginx+keepalive实现高可用负载均衡
2020-05-08 crontab -e 配置定时任务
2020-05-08 生产环境中进行机器学习模型部署(using Flask)(×××××)
2020-05-08 机器学习基本流程整理
2020-05-08 vi 显示行号
2020-05-08 keepalived安装
2019-05-08 centos升级glibc动态库
点击右上角即可分享
微信分享提示