İyi forumlar herkese, Flutter ile bir mobil uygulama geliştiriyorum ancak bir kaç güncelleme yaptıktan sonra hatalar almaya başladım. Eklediğim çok fazla pakette yok henüz projenin başlarındayım. Hatanın tam hali şu şekilde:
`Launching lib\main.dart on sdk gphone64 ×86 64 in debug mode…
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:path_provider_android:compileDebugJavaWithJavac’.
Could not resolve all files for configuration ‘:path_provider_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: C:\Users\memo-\AppData\Local\Android\sdk\platforms\android-34\core-for-system-modules.jar.
> Error while executing process C:\Program Files\Android\Android Studio\jbr\bin\jlink.exe with arguments {–module-path C:\Users\memo-.gradle\caches\transforms-3\3ff7c40156b4c9a12e03921ad97ad6a2\transformed\output\temp\jmod –add-modules java.base –output C:\Users\memo-.gradle\caches\transforms-3\3ff7c40156b4c9a12e03921ad97ad6a2\transformed\output\jdkImage –disable-plugin system-modules}
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.
BU�LD FAILED in 3s
Running Gradle task ‘assembleDebug’… 3,7s
Error: Gradle task assembleDebug failed with exit code 1`
Java - gradle ve kotlin sürümü ile alakalı bir sorun olması lazım sanırım fakat boş bir proje oluşturunca çalışıyor. Yani yüklemelerimin doğru ve uyumlu olduğunu düşünüyorum, sanırım kullanımlarım ile alakalı bir problem.
flutter doctor -v çıktım:
`flutter doctor -v
[√] Flutter (Channel stable, 3.24.5, on Microsoft Windows [Version 10.0.19045.5247], locale tr-TR)
• Flutter version 3.24.5 on channel stable at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision dec2ee5c1f (5 weeks ago), 2024-11-13 11:13:06 -0800
• Engine revision a18df97ca5
• Dart version 3.5.4
• DevTools version 2.37.3
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at C:\Users\memo-\AppData\Local\Android\sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.12.3)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.12.35527.113
• Windows 10 SDK version 10.0.22621.0
[√] Android Studio (version 2024.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
[√] VS Code (version 1.96.0)
• VS Code at C:\Users\memo-\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.102.0
[√] Connected device (4 available)
• sdk gphone64 ×86 64 (mobile) • emulator-5554 • android-x64 • Android 15 (API 35) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.5247]
• Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.140
• Edge (web) • edge • web-javascript • Microsoft Edge 131.0.2903.86
[√] Network resources
• All expected network resources are available.
• No issues found!`
java -version çıktım:
java -version
java version "21.0.5" 2024-10-15 LTS
Java(TM) SE Runtime Environment (build 21.0.5+9-LTS-239)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.5+9-LTS-239, mixed mode, sharing)
pubspec.yaml ile işimiz var mı bilmiyorum ama işinize yarayacak kısım:
`version: 0.1.0
environment:
sdk: 3.5.4
dependencies:
flutter:
sdk: flutter
#Paketler buraya
google_fonts: 6.2.1
lottie: 3.2.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: 4.0.0`
gradle-wrapper.properties çıktım:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
Projeyi sıfırdan yeni oluşturdum bugün test etmek için yani build.gradle dosyaları vs varsayılan ayarlarında eğer ihtiyacınız olursa diye söyleyeyim dedim.
Bir de ilk defa flutter run komutunu çalıştırırsam şöyle bir uyarı geliyor:
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.
Sadece uyarı olduğu için projelerin çalışmasını etkilemiyor genelde yani boş projeyi çalıştırırken yine aynı uyarıyı veriyor, ama proje açılıyor.