I’m trying to build my Flutter project using url_launcher: ^6.3.1 and shared_preferences: ^2.3.3, but I’m encountering an error during the build process. Here’s the error message I’m seeing:
Launching libmain.dart on sdk gphone16k x86 64 in debug mode…
Running Gradle task ‘assembleDebug’…
Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.
FAILURE: Build failed with an exception.
- What went wrong:
Could not determine the dependencies of task ‘:url_launcher_android:compileDebugJavaWithJavac’.
Could not determine the dependencies of null.
Cannot query the value of this provider because it has no value available.
- 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 31s
Error: Gradle task assembleDebug failed with exit code 1
Flutter version 3.24.5
Dart version 3.5.4
DevTools version 2.37.3
Android SDK version 34.0.0
Platform android-34, build-tools 34.0.0
pubspec.yaml
url_launcher: ^6.3.1
shared_preferences: ^2.3.3
gradle-wrapper.properties:
distributionUrl=https://services.gradle.org/distributions/gradle-8.3-all.zip
Dinesh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.