FlutterRtmpPlublisher icon indicating copy to clipboard operation
FlutterRtmpPlublisher copied to clipboard

Error: Kotlin Gradle plugin version

Open dekdoijaidee opened this issue 5 years ago • 12 comments

Hi

I use your lib and found error when build my app

FAILURE: Build failed with an exception.

  • What went wrong: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher. The following dependencies do not satisfy the required version: project ':flutter_rtmp_publisher' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0

What should I do?

Thank you

dekdoijaidee avatar Jan 19 '20 12:01 dekdoijaidee

You have to degrade your Kotlin Gradle Version : 1.3.0, because flutter_rtmp_publisher using gradle version of 1.3.0.

TejaDroid avatar Feb 05 '20 13:02 TejaDroid

Howdy! forgive me but I must be missing something because just changing build.gradle ext.kotlin_version = '1.3.50' to "1.3.0" doesn't fix the issue. Can you please be more specific on how to downgrade property. Thanks.

I tried a flutter clean but still got the same error

  • What went wrong: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher. The following dependencies do not satisfy the required version: root project 'android' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0

Vercjames avatar Apr 19 '20 17:04 Vercjames

resolved, changing minSdkVersion 16 to 21 and copying this packages Buildscript worked.

Vercjames avatar Apr 19 '20 18:04 Vercjames

@Vercjames , I too have the same issue. I have changed minSdkVersion 16 to 21. Still, I am getting the error. Could you detail copying these packages build scripts mean?

selvakumardreams avatar Apr 21 '20 11:04 selvakumardreams

Hit me up with the error message you are getting. Additionally after changing the 16 to 21 and then downgrading the Grable Version, I ran a Flutter Clean.

android/build.gradle

buildscript {
    ext.kotlin_version = '1.3.0'
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }

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

allprojects {
    repositories {
        google()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Vercjames avatar Apr 21 '20 14:04 Vercjames

Thanks @Vercjames its resolved

selvakumardreams avatar Apr 21 '20 17:04 selvakumardreams

@Vercjames my issue is not getting resolved by doing these three things

Hit me up with the error message you are getting. Additionally after changing the 16 to 21 and then downgrading the Grable Version, I ran a Flutter Clean.

android/build.gradle

buildscript {
    ext.kotlin_version = '1.3.0'
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }

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

allprojects {
    repositories {
        google()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Could u explain me in some detail?

abheet-98 avatar May 06 '20 10:05 abheet-98

Can you provide me some context kind sir. an error message perhaps. I assume you are trying to set this all up in a new flutter project. Also I used windows to compile my application, if you are MacOS something may be different with the pod installation.

Vercjames avatar May 06 '20 13:05 Vercjames

@Vercjames Yes I'm trying this all in a new flutter project and working on windows. The error message is same: FAILURE: Build failed with an exception.

  • What went wrong: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher. The following dependencies do not satisfy the required version: project ':flutter_rtmp_publisher' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0

I have set minsdk in app build.gradle to 21 and done flutter clean as well. If u could help me with how to downgrade the gradle version that will suffice I think.

abheet-98 avatar May 06 '20 16:05 abheet-98

Peculiar - since the provided script should have downgraded gradle for you. but rather than leaving you hanging I made a video to hopefully put this thread to bed. hopefully this solves the issue.

https://www.youtube.com/watch?v=3fVS8dVMftY

Vercjames avatar May 06 '20 22:05 Vercjames

@Vercjames Thank you for the video but now there are more issues arising. Actually I'm also using the camera plugin which I think is giving error.

**FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:preDebugBuild'.

Android dependency 'androidx.lifecycle:lifecycle-runtime' has different version for the compile (2.0.0-rc01) and runtime (2.0.0) classpath. You should manually set the same version via DependencyResolution

  • 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 32s Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 33.6s The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility. Building plugin camera... Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done 4.4s

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring root project 'camera'.

SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

  • 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 3s

The plugin camera could not be built due to the issue above.**

abheet-98 avatar May 07 '20 08:05 abheet-98

Hit me up with the error message you are getting. Additionally after changing the 16 to 21 and then downgrading the Grable Version, I ran a Flutter Clean.

android/build.gradle

buildscript {
    ext.kotlin_version = '1.3.0'
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }

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

allprojects {
    repositories {
        google()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

after downgrading this the error I'm having

FAILURE: Build failed with an exception.

  • Where: Build file '/Users/user/StudioProjects/startv/android/app/build.gradle' line: 25

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

java.lang.ExceptionInInitializerError (no error message)

odejinmi avatar Sep 15 '21 13:09 odejinmi