02 Dec 2024 11:59 AM
Hi team,
I am trying to setup and build demo with Flutter plug-in version3.303.1 with this example, https://pub.dev/packages/dynatrace_flutter_plugin/example
When I run flutter run, I get error with following messages:
Which codes should I add additionally to example?
------------------------------------------------
Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
e: file:///C:/Users/xxxxxxx/AppData/Local/Pub/Cache/hosted/pub.dev/dynatrace_flutter_plugin-3.303.1/android/src/main/kotlin/com/dynatrace/android/agent/SettingsApiImpl.kt:32:21 This declaration needs opt-in. Its usage must be marked with '@kotlin.ExperimentalStdlibApi' or '@OptIn(kotlin.ExperimentalStdlibApi::class)'
e: file:///C:/Users/xxxxxxx/AppData/Local/Pub/Cache/hosted/pub.dev/dynatrace_flutter_plugin-3.303.1/android/src/main/kotlin/com/dynatrace/android/agent/SettingsApiImpl.kt:32:41 This declaration needs opt-in. Its usage must be marked with '@kotlin.ExperimentalStdlibApi' or '@OptIn(kotlin.ExperimentalStdlibApi::class)'
e: file:///C:/Users/xxxxxxx/AppData/Local/Pub/Cache/hosted/pub.dev/dynatrace_flutter_plugin-3.303.1/android/src/main/kotlin/com/dynatrace/android/agent/SettingsApiImpl.kt:32:41 The feature "enum entries" is only available since language version 1.9
FAILURE: Build failed with an exception.
-------------------------------------------------
Solved! Go to Solution.
03 Dec 2024 07:24 AM
I have resolved this by upgrading Kotlin plugin to version 1.9.25 in android/settings.gradle file.
plugins {
// Other plugins
id "org.jetbrains.kotlin.android" version "1.9.25" apply false
}
03 Dec 2024 09:14 AM
Thank you, now I can build app 😁