Flutter App stuck at “Running Gradle task 'assembleDebug'… ”

后端 未结 30 3542
你的背包
你的背包 2020-12-08 18:28

When I run the app it get stuck

Launching lib\\main.dart on Lenovo A319 in debug mode...
Running Gradle task \'assembleDebug\'...
(This is taking an unexpec         


        
30条回答
  •  眼角桃花
    2020-12-08 18:52

    For creating an apk for Android in Flutter this issue sometimes happens. I had the luck of facing this issue as well. Here are the few ways it can be solved:

    1. Due to androidX
    

    If you followed recommended route from here: https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility

    Try this:

    Check with steps in “not recommended” way in above tutorial if every listed files is same as in your project, especially : in root/android/gradle/wrapper/gradle-wrapper.properties set distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip in root/android/build.gradle, set dependencies { classpath 'com.android.tools.build:gradle:3.3.2' }

    check if root/android/app/build.gradle SDK version is set to minimum 28 for: compileSdkVersion 28 and targetSdkVersion 28 Thank you.

提交回复
热议问题