简体   繁体   English

无法在 Android Studio 中运行 Flutter 应用程序

[英]Unable run run Flutter Application in Android Studio

My Flutter Application was working fine, but suddenly it started giving this gradle issue in android studio.我的 Flutter 应用程序运行良好,但突然它开始在 android 工作室中给出这个 gradle 问题。

i tried removing.pub_cache folder as well, along with removing build folder inside my application but still facing this issue when i am opening my flutter application in android studio我也尝试删除 .pub_cache 文件夹,同时删除我的应用程序中的构建文件夹,但是当我在 android 工作室中打开我的 flutter 应用程序时仍然面临这个问题

issue问题

what is shared_preference_android here and how to fix this issue?这里的 shared_preference_android 是什么以及如何解决这个问题?

Quick fixes to try before doing anything drastic:在做任何激烈的事情之前尝试快速修复:

Try flutter clean and then flutter pub get .尝试flutter clean然后flutter pub get

If that doesn't work, you can try upgrading your Flutter SDK (not sure if you'd want to) like so: flutter upgrade .如果这不起作用,您可以尝试升级您的 Flutter SDK(不确定您是否愿意),如下所示: flutter upgrade

You can also run flutter doctor to see a list of possible issues with your code.您还可以运行flutter doctor查看您的代码可能存在的问题列表。

  • Try to run ./gradlew clean and ./gradlew build on yourproject/android .尝试在yourproject/android上运行./gradlew clean./gradlew build
  • Try to run flutter clean and flutter pub get on yourproject/lib or try to use flutter doctor to see issues.尝试运行flutter cleanflutter pub get on yourproject/lib或尝试使用flutter doctor查看问题。

these two commands work properly to fix your machine bugs or your code bugs这两个命令可以正常工作以修复您的机器错误或代码错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM