''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.
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.
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.
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.