flutter build apk
Running Gradle task 'assembleRelease'... Running Gradle task 'assembleRelease'... Done 13.5s The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility. Building plugin appsflyer_sdk... Running Gradle task 'assembleAarRelease'... Running Gradle task 'assembleAarRelease'... Done 2.0s
FAILURE: Build failed with an exception.
Task 'assembleAarRelease' not found in root project 'appsflyer_sdk'.
Try: Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run wit Get more help at https://help.gradle.org BUILD FAILED in 1s
To fix this exception you must update version of build:gradle classpath in you app/build.gradle to 4.0.1
classpath 'com.android.tools.build:gradle:4.0.1'
And Open YourProject > gradle > wrapper > gradle-wrapper.properties and replace
distributionUrl=https\://services.gradle.org/distributions/gradle-version-number-all.zip
With
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip