Finished with error: Gradle task assembleDebug failed with exit code 1

前端 未结 16 2077
执笔经年
执笔经年 2020-12-10 06:33
Launching lib\\main.dart on HTC One M9PLUS in debug mode... Initializing gradle... Resolving dependencies... Gradle task \'assembleDebug\'... registerResGeneratingTa         


        
相关标签:
16条回答
  • 2020-12-10 06:46

    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:

    0 讨论(0)
  • 2020-12-10 06:48

    Insert this path C:\Program Files\Android\Android Studio\jre\bin in your environment variables [ Systems variables ] may be it's work

    0 讨论(0)
  • 2020-12-10 06:48

    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

    0 讨论(0)
  • 2020-12-10 06:49

    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.

    1. Open your Android Studio preferences(Command + ',') and go to Languages and Frameworks -> Dart

    2. Check "Enable Dart support for the project your_project_name"

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

    4. Click "Apply"

    5. flutter packages get

    6. flutter run

    0 讨论(0)
  • 2020-12-10 06:49

    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

    0 讨论(0)
  • 2020-12-10 06:50
    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)

    0 讨论(0)
提交回复
热议问题