添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
玩命的火车  ·  Docker build is not ...·  6 天前    · 
很酷的回锅肉  ·  Wrong build ...·  5 天前    · 
伤情的凉茶  ·  On Windows, how do ...·  5 天前    · 
谦和的牙膏  ·  [meta-freescale] How ...·  2 天前    · 
害羞的咖啡豆  ·  更新 IDE 和 SDK 工具  |  ...·  23 小时前    · 
深情的香槟  ·  CGAL 6.0 - 2D ...·  6 月前    · 
听话的吐司  ·  万方数据知识服务平台·  9 月前    · 

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.