ProcessException: Process “C:\..\myapp\android\gradlew.bat” exited abnormally:

前端 未结 9 1602
心在旅途
心在旅途 2020-12-20 13:17
ProcessException: Process \"C:\\Users\\User\\Desktop\\Courses\\flutter\\myapp\\android\\gradlew.bat\" exited abnormally:
Exception in thread \"main\" java.lang.Runti         


        
相关标签:
9条回答
  • 2020-12-20 13:39
        defaultConfig {
        // TODO: Specify your own unique Application ID 
            (https://developer.android.com/studio/build/application-id.html).
            applicationId "com.match_hire"
            minSdkVersion 16
            targetSdkVersion 28
            multiDexEnabled true
            versionCode flutterVersionCode.toInteger()
            versionName flutterVersionName
            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
       }
    

    add multiDexEnabled true might work

    0 讨论(0)
  • 2020-12-20 13:46

    The problem is with your gradle installation, for linux users:

    1. Navigate to .gradle folder in your Home directory
    2. Open wrapper/dists and you'd find all your gradle installation
    3. If you find just one delete it and re-run your dart code from vs-code
    4. Ensure you have a good internet as the process would try to download a new gradle.
    5. In case you have more than one gradle installed go back to vs-code and take note of what version of gradle it is complaining about.
    6. Delete that version and re-run your dart code (don't forget to get a good internet).
    0 讨论(0)
  • 2020-12-20 13:50

    Open gradlew.bat file in edit mode in the new window of android studio and resolve the gradle issue. I Just delete gradle-4.10.2-all and rebuild my project.

    0 讨论(0)
  • 2020-12-20 14:00

    I solve this error with delete flutter sdk and download it again. Be sure that you have good internet.

    0 讨论(0)
  • 2020-12-20 14:01

    Delete .gradle the folder in C:\Users***.gradle in Windows or /Users/xxxx/.gradle in Mac , connect to the internet, rebuild project to download the latest Gradle.

    0 讨论(0)
  • 2020-12-20 14:02

    This might help if you have license problem.

    1. run flutter doctor on command prompt. If you get this: ! Some Android licenses not accepted.
    2. run flutter doctor --android-licenses and accept all the licenses.
    3. now run flutter run and you are good to go.
    0 讨论(0)
提交回复
热议问题