Launching lib\\main.dart on HTC One M9PLUS in debug mode... Initializing gradle... Resolving dependencies... Gradle task \'assembleDebug\'... registerResGeneratingTa
This often happens when you try to re open or clone a project that created a while ago. to fix it all you need to do is this :
flutter pub upgrade
Here is an image to help you understand what to use more clearly:
Insert this path C:\Program Files\Android\Android Studio\jre\bin
in your environment variables [ Systems variables ] may be it's work
My issue was JAVA_HOME variable not correctly configured. I change it from
C:\Program Files\Java\jdk1.8.0_181\bin
to
C:\Program Files\Java\jdk1.8.0_181
and i think an active internet connection is required at least for first build
I had the same problem after cloning a flutter project from github .
It usually happens with projects that were created in other machines.
To fix this on Android Studio on MAC, Follow these steps.
Open your Android Studio preferences(Command + ',') and go to Languages and Frameworks -> Dart
Check "Enable Dart support for the project your_project_name"
In "Dart SDK path" click in "…" and navigate to flutter SDK directory. Under that directory you'll find "bin/cache/dart-sdk". This is the dart sdk path you should use.
Click "Apply"
flutter packages get
flutter run
the Error From Gradle Package Version To Fix Update The Package
Step 1: Open Folder gradle Path C:\Users\{YourUserName}\.gradle\wrapper\dists
then Chick The Version.
If it Was Old Update it from gradle.org
Grandle New Version Download
Download The Lastest Version ZIP File And unzip it With accepting Files Replacing.
And OPEN ANDRIOD STEDIO and run
Launching lib\main.dart on sdk gphone x86 arm in debug mode...
Running Gradle task 'assembleDebug'...
The system cannot find the path specified.
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Exception: Gradle task assembleDebug failed with exit code 1
I have the above issue and the solution was to create the project in folder in C: with out any special characters in it's name (C:\flutter projects) because when I have this issue the folder name which contain the project was that (D:\Graphic designer & Programmer\Programmer project)