androidflutterdartgradlefvm

Could not get unknown property 'usesUnsupportedDependencyVersions' for project ':app' of type org.gradle.api.Project


Steps to reproduce melos clean && melos bootstrap fvm flutter pub get fvm flutter pub upgrade fvm flutter pub run build_runner clean fvm flutter pub run build_runner build --delete-conflicting-outputs running project

FAILURE: Build failed with an exception.

Failed to apply plugin 'dev.flutter.flutter-gradle-plugin'. Could not get unknown property 'usesUnsupportedDependencyVersions' for project ':app' of type org.gradle.api.Project.

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

BUILD FAILED in 2s Error: Gradle task assembleDevDebug failed with exit code 1


Solution

  • This issue has been resolved in my monorepo project by following these steps:

    1. Delete Gradle cache
    2. In the android directory, clean the project: ./gradlew clean
    3. In the /app directory, delete the .dart_tool folder, then run:
    1. In the root project directory, run: melos clean && melos bootstrap