flutter.sdk not set in local.properties
The error message “flutter.sdk not set in local.properties” usually occurs when you try to run a Flutter project, but the path to the Flutter SDK is not configured correctly. The local.properties file is used to define project-specific settings, such as the SDK location.
To fix this error, you need to set the correct path to the Flutter SDK in the local.properties file of your project. Here’s how you can do it:
- Open your Flutter project in a text editor.
- Locate the local.properties file in the project directory. If it doesn’t exist, create a new file with that name.
-
Open the local.properties file and add the following line:
flutter.sdk=/path/to/flutter
Replace
/path/to/flutter
with the actual path to your Flutter SDK installation. - Save the local.properties file and try running your Flutter project again. The error should be resolved if the SDK path is set correctly.
Here’s an example of how the local.properties file should look like:
flutter.sdk=/Users/username/flutter
In this example, the Flutter SDK is located at /Users/username/flutter
.