platform_device_id icon indicating copy to clipboard operation
platform_device_id copied to clipboard

Getting error if imports this package

Open johnxpres opened this issue 1 year ago • 2 comments

Error is :

Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...

FAILURE: Build failed with an exception.

  • Where: Build file 'D:\Echo Switch\Flutter\Flutter Project\echo_switch\android\build.gradle' line: 11

  • What went wrong: A problem occurred evaluating root project 'android'.

Could not find method implementation() for arguments [org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.20] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

  • 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 1s Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)

johnxpres avatar May 17 '23 14:05 johnxpres

I am getting this error too, after having upgraded my flutter and dart:

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':platform_device_id' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

I should mention my build gradle has a version above that

buildscript {
    ext.kotlin_version = '1.7.10'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.3.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}...

lastmeta avatar May 19 '23 17:05 lastmeta

use this version dependencies { classpath 'com.android.tools.build:gradle:7.1.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" }

cwangfr avatar Jun 26 '23 13:06 cwangfr