Exception from flutter run: Exception: Unable to locate Gradle. Please configure the path to Gradle using `flutter config --gradle-dir`.
package:flutter_tools/src/base/common.dart 31 throwToolExit
package:flutter_tools/src/android/gradle.dart 115 buildGradleProject.<async>
dart:async/future.dart 184 Future.Future.microtask.<fn>
package:stack_trace/src/stack_zone_specification.dart 185 StackZoneSpecification._run
package:stack_trace/src/stack_zone_specification.dart 97 StackZoneSpecification._registerCallback.<fn>
package:stack_trace/src/stack_zone_specification.dart 185 StackZoneSpecification._run
package:stack_trace/src/stack_zone_specification.dart 97 StackZoneSpecification._registerCallback.<fn>
dart:async/zone.dart 1146 _rootRun
dart:async/zone.dart 1026 _CustomZone.run
dart:async/zone.dart 924 _CustomZone.runGuarded
dart:async/zone.dart 951 _CustomZone.bindCallback.<fn>
package:stack_trace/src/stack_zone_specification.dart 185 StackZoneSpecification._run
package:stack_trace/src/stack_zone_specification.dart 97 StackZoneSpecification._registerCallback.<fn>
package:stack_trace/src/stack_zone_specification.dart 185 StackZoneSpecification._run
package:stack_trace/src/stack_zone_specification.dart 97 StackZoneSpecification._registerCallback.<fn>
dart:async/zone.dart 1150 _rootRun
dart:async/zone.dart 1026 _CustomZone.run
dart:async/zone.dart 924 _CustomZone.runGuarded
dart:async/zone.dart 951 _CustomZone.bindCallback.<fn>
dart:async/schedule_microtask.dart 41 _microtaskLoop
dart:async/schedule_microtask.dart 50 _startMicrotaskLoop
dart:isolate-patch/isolate_patch.dart 96 _runPendingImmediateCallback
dart:isolate-patch/isolate_patch.dart 149 _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
If I run flutter config in the terminal, flutter command not found exception is thrown in the terminal.