FAILURE: Build failed with an exception.

  • Where: Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1256

  • What went wrong: Could not determine the dependencies of task ':app:compileFlutterBuildDebug'.

Index 1 out of bounds for length 1

  • Try: 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.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2m 55s Exception: Gradle task assembleDebug failed with exit code 1


Solution 1: Tasnuva Tavasum oshin

Solution : Update Android Studio

Which Will Update the SDK Version and solve your issue .

Then before run

flutter clean
flutter pub get 
flutter run 


Solution 2: voselo

You can try to use this command:

flutter clean && flutter pub get && flutter run