3

I was creating APK for my flutter project so I followed the below steps to generate a signed APK

Tools -> Flutter -> Open for editing in android studio

Then opened the model in a new window

I got the Gradle sync failed error, After my further investigation I run the command gradlew --warning-mode all in the terminal & I got the below message from gradle

The AbstractArchiveTask.destinationDir property has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the destinationDirectory property instead.

Since I am new to flutter & always scared of Gradle failing, I am not sure how to fix this issue & set the destination directory

Or if you know how to create APK from the flutter project do let me know if I am doing anything wrong to generate APK

Dinesh Falwadiya
  • 769
  • 5
  • 20
  • I get the same issue. Does anyone has any solution? I have posted a question https://stackoverflow.com/questions/72055485/deprecation-warning-in-gradle-in-android-studio-in-flutter-project – Sudipta Roy Apr 29 '22 at 10:33

1 Answers1

0

Gradle sync failed error is not any error in flutter.

to build apk in flutter first of all you run flutter clean command then run flutter pub get command

after then you run flutter build apk command to build apk

also if you use Android Studio then you can build apk without command using

in Android Studio in top menu Build => Flutter => Build APK and click on Build APK it will make apk for you

Khunt Arpit
  • 438
  • 4
  • 11