You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if i add this( device_info_plus: 9.1.2),the project will show build failed.I don't know how to fix it.
Dart Dependencies
No response
Native dependencies
No response
Compilation Error
Multiple build operations failed.
Could not create task ':app:compileDebugKotlin'.
Could not create task ':device_info_plus:compileDebugKotlin'.
Could not create task ':app:compileDebugKotlin'.
Could not initialize class org.jetbrains.kotlin.gradle.plugin.sources.DefaultLanguageSettingsBuilderKt
Exception java.lang.NoSuchFieldError: KOTLIN_1_4 [in thread "Daemon worker Thread 2"]
* Try:
> 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.
* Exception is:
com.intellij.openapi.externalSystem.model.ExternalSystemException: Multiple build operations failed.
Could not create task ':app:compileDebugKotlin'.
Could not create task ':device_info_plus:compileDebugKotlin'.
Could not create task ':app:compileDebugKotlin'.
Could not initialize class org.jetbrains.kotlin.gradle.plugin.sources.DefaultLanguageSettingsBuilderKt
Exception java.lang.NoSuchFieldError: KOTLIN_1_4 [in thread "Daemon worker Thread 2"]
at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.addModels(GradleModelFetchAction.java:183)
at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.lambda$execute$1(GradleModelFetchAction.java:73)
at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.lambda$runWithSpan$1(GradleOpenTelemetry.java:87)
at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.callWithSpan(GradleOpenTelemetry.java:73)
at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.callWithSpan(GradleOpenTelemetry.java:61)
Flutter Doctor
/Users/apple/flutter/bin/flutter doctor --verbose
[✓] Flutter (Channel stable, 3.22.2-0.0.pre.1, on macOS 15.0 24A335 darwin-arm64, locale zh-Hans-CN)
• Flutter version 3.22.2-0.0.pre.1 on channel stable at /Users/apple/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 63034ab69d (3 months ago), 2024-07-12 14:00:04 +0800
• Engine revision 55eae6864b
• Dart version 3.4.1
• DevTools version 2.34.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/apple/Android/Sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/apple/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16A242d
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.1)
• Android Studio at /Applications/Android Studio.app/Contents
• 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
• android-studio-dir = /Applications/Android Studio.app
• Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
[✓] VS Code (version 1.93.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.96.0
Checklist before submitting a bug
I searched issues in this repository and couldn't find such bug/problem
I Google'd a solution and I couldn't find it
I searched on StackOverflow for a solution and I couldn't find it
I read the README.md file of the plugin
I'm using the latest version of the plugin
All dependencies are up to date with flutter pub upgrade
I did a flutter clean
I tried running the example project
The text was updated successfully, but these errors were encountered:
Do you have this env variable somewhere in the codebase? Because device_info_plus definitely doesn't have it and also Kotlin 1.4.0 is a really old version from 2020. Be sure to use a newer version if your project still relies on that old Kotlin.
Launching lib\main.dart on SM S926B in debug mode...
Running Gradle task 'assembleDebug'...
e: C:\Users\dcbrh\AppData\Local\Pub\Cache\hosted\pub.dev\sensors_plus-1.4.1\android\src\main\kotlin\dev\fluttercommunity\plus\sensors\StreamHandlerImpl.kt: (16, 35): Property delegate must have a 'getValue(StreamHandlerImpl, KProperty<*>)' method. None of the following functions is suitable:
public inline operator fun <T> Lazy<Sensor?>.getValue(thisRef: Any?, property: KProperty<*>): Sensor? defined in kotlin
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sensors_plus:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
Operating System
mac os
Plugin
device_info_plus
Version
9.1.2
Flutter SDK
3.22.2-0.0.pre.1 • channel stable
Compilation command
if i add this( device_info_plus: 9.1.2),the project will show build failed.I don't know how to fix it.
Dart Dependencies
No response
Native dependencies
No response
Compilation Error
Flutter Doctor
Checklist before submitting a bug
flutter pub upgrade
flutter clean
The text was updated successfully, but these errors were encountered: