When I execute the commands flutter run or flutter build apk, I encounter an error, and my application fails to build. Why is this happening?
>> flutter run
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
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:
Execution failed for task ':url_launcher_android:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':url_launcher_android:androidJdkImage'.
> Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JdkImageTransform: /Users/daniel-tt0577/Library/Android/sdk/platforms/android-34/core-for-system-modules.jar.
> Error while executing process /Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home/bin/jlink with arguments {--module-path /Users/daniel-tt0577/.gradle/caches/transforms-3/1e0ed50fd379c976c7a7887c43fa6543/transformed/output/temp/jmod --add-modules java.base --output /Users/daniel-tt0577/.gradle/caches/transforms-3/1e0ed50fd379c976c7a7887c43fa6543/transformed/output/jdkImage --disable-plugin system-modules}
* 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 45s
Running Gradle task 'assembleDebug'... 46.1s
Error: Gradle task assembleDebug failed with exit code 1
What should do to clear this error ?