Home > database >  Build APK stuck at Task :app:checkReleaseAarMetadata
Build APK stuck at Task :app:checkReleaseAarMetadata

Time:04-18

i am new in flutter.

When i run:

flutter apk build -v

it always stuck at

[ 29946 ms] > Task :app:checkReleaseAarMetadata

I left it for almost an hour and nothing, same happen when i run it on release or debug on my own device via usb debugging, but run perfectly on emulator on debug mode

any help would be appreciated, thanks

CodePudding user response:

add the following line to android/build.gradle.try it and update is it fixed!
buildscript {
    ext {
        androidXCore = "1.7.0" // <-- Add this line
        buildToolsVersion = "29.0.3"
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 29
        ndkVersion = "20.1.5948944"
    }

CodePudding user response:

Thanks, I found the solution.

In the end tried to clean install Android Studio including sdk, gradle, etc by deleting android studio related stuff on %APPDATA%, %USERPROFILE%, %LOCALAPPDATA%.

After that i build the apk again from vscode console and it work.

I think the error occurred because of missing stuff in gradle or error during sdk installation.

  • Related