添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
聪明伶俐的跑步鞋  ·  Legacy UI whole app ...·  4 天前    · 
独立的松鼠  ·  android gradle ...·  4 天前    · 
睿智的玉米  ·  CTest does not find ...·  3 天前    · 
低调的菠菜  ·  Build fails behind ...·  昨天    · 
怕老婆的鸵鸟  ·  “书法之声” ...·  5 月前    · 
咆哮的抽屉  ·  String - JavaScript | MDN·  7 月前    · 
爱搭讪的烤土司  ·  wkwebview - ...·  1 年前    · 

Sorry if I ask a stupid question, but I’ve been trying for a while now and can’t figure it out. I have used so many solutions and it just doesn’t work, The app itself has no bugs and is just fine and the error message:

‘‘Build file ‘C:\Users\User\StudioProjects\workbridges\android\build.gradle’ line: 28’’

is also without bugs in the file and it doesn’t cause a problem… This is what I get when I want to open the app with Android emulator:

''Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Gebruiker\StudioProjects\workbridges\android\build.gradle' line: 28
* What went wrong:
A problem occurred evaluating root project 'android'.
> Build completed with 1 failures.
   > com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 920ms
Exception: Gradle task assembleDebug failed with exit code 1''

I would really appreciate it if someone could help me.

This sounds less like a Gradle question, but more like an Android question.
I recommend you ask in some Android community.
You might have better chances for help with this there.

Yes, unfortunately every failed Gradle execution gives that non-sense advice, even if you for example have a compilation error because you wrote invalid syntax in your programming language.

So the help you get from me is a redirect to a better place for the question. :slight_smile:
You can of course also wait for someone else having a better answer that solves your problem.
I just recommended to ask at a place where the probability for getting help is higher. :slight_smile:

I did not ask now.
I asked back then right after you said you solved it:

Another user with the same problem asked how you solved it 2 days ago which is why I back then asked you whether you could share your solution in case this happens. :wink:

Hi, I already solved it, I updated Android Studio and Gradle to their latest version, then I created a Flutter project from scratch so that it would create the Android folder with the latest updates, then I transferred the folders of my project to the new one that I created, except for the Android folder, updated the packages in the pubspec.yaml file and it worked. I hope it can be useful to you.