I updated Flutter to the latest version. I get an error like this:
Launching lib/main.dart on SM A528B in debug mode...
Running Gradle task 'assembleDebug'...
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply
You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply
/Users/ebuzersariyerlioglu/Desktop/lgs_ingilizce_panda/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:109: error: cannot find symbol
flutterEngine.getPlugins().add(new app.rive.rive.RivePlugin());
^
symbol: class RivePlugin
location: package app.rive.rive
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* 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
BUİLD FAILED in 8s
Error: Gradle task assembleDebug failed with exit code 1
what should I do?
This is flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.0, on macOS 14.3.1 23D60 darwin-arm64, locale tr-TR)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] Connected device (3 available)
[✓] Network resources
I’m also wondering if anyone else is getting this error other than me. Because I couldn’t see it on other blogs.
2
Answers
The problem is solved when I change the kotlin version.
Go to android/build.gradle
I don't know why. But it works. Admins can close the post.
delete android/settings.gradle , after delete run <flutter create .>, to create new setting.gradle , after that should update "org.jetbrains.kotlin.android" to last version of kotlin
for more information:enter link description here