Error:
Launching lib\main.dart on sdk gphone x86 64 in debug mode...
Warning: The plugin flutter_downloader requires Android SDK version 33.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
Warning: The plugin flutter_plugin_android_lifecycle requires Android SDK version 33.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
Warning: The plugin image_picker_android requires Android SDK version 33.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
Warning: The plugin permission_handler_android requires Android SDK version 33.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
Warning: The plugin url_launcher_android requires Android SDK version 33.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
Warning: The plugin webview_flutter_android requires Android SDK version 32.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
One or more plugins require a higher Android SDK version.
Fix this issue by adding the following to C:\Users\dharm\AndroidStudioProjects\webviewmyhospitalnow\android\app\build.gradle:
android {
compileSdkVersion 33
...
}
FAILURE: Build failed with an exception.
Sulotion:
The error notice says that your project is set up with an older version of the Android SDK, even though some of the Flutter plugins you are utilising require a higher version (SDK version 33). You must update the compileSdkVersion in your android/app/build.gradle file in order to fix this problem.
What you can do is as follows:
- In your Flutter project, open the file at android/app/build.gradle.
- Find the compileSdkVersion setting inside the android block, then update it to version 33:
It ought to resemble this in appearance.
- Conserve the file.
You should be able to execute your Flutter project without running into issues relating to the SDK version after making this modification. whether the problems persist, carefully follow the directions in the error messages and see whether any other plugins or dependencies require updating as well.
After making these adjustments, don’t forget to rebuild your project and execute the flutter clean command:
flutter clean
flutter run
This should resolve the Android SDK version mismatch issue.