question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plugin version (1.4.10) is not the same as library version (1.3.72)

See original GitHub issue

升级 AndroidStudio 4.1,升级 kotlin plugin 1.4.10 后,引入 BaseRecyclerViewAdapterHelper 会有警告: Plugin version (1.4.10) is not the same as library version (1.3.72)

project build.gradle:

buildscript {
    ext.kotlin_version = "1.4.10"
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.1.0"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

app build.gradle:

plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-android-extensions'
    id 'kotlin-kapt'
}

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.1"

    defaultConfig { ... }
    buildTypes { ... }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {
    // 这一行会有警告 Plugin version (1.4.10) is not the same as library version (1.3.72) 
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'

    implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
}

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

12reactions
MrCsabaTothcommented, Nov 23, 2020

thanks, i solved it with: implementation (“org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version”){ exclude group:“org.jetbrains.kotlin”, module: “kotlin-stdlib-jdk7” } implementation “org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version”

You are no longer required to declare dependency in your app level gradle file. Check Kotlin 1.4.0 Release notes: Dependency on the standard library added by default

Just to be clear: this means that we can just simply remove that implementation line instead of fiddling / hacking with it?

9reactions
markangelohernandezcommented, Nov 17, 2020

thanks, i solved it with: implementation (“org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version”){ exclude group:“org.jetbrains.kotlin”, module: “kotlin-stdlib-jdk7” } implementation “org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version”

You are no longer required to declare dependency in your app level gradle file. Check Kotlin 1.4.0 Release notes: Dependency on the standard library added by default

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning "Kotlin plugin version is not the same as library ...
The automatically added standard library will be the same version of the Kotlin Gradle plugin, since they have the same versioning.
Read more >
"Plugin version not the same as library version" incorrectly ...
"Plugin version not the same as library version" incorrectly reported for -jdk7 or -jdk8 libraries. Duplicates 1. Duplicates 1 issue (0 unresolved).
Read more >
Warning “Kotlin plugin version is not the same as library ...
I have an Android studio project in which I have added a Java library module, which I call core . My three Gradle...
Read more >
plugin version (1.6.10) is not the same as library version (1.7.10)
The automatically added standard library will be the same version of the Kotlin Gradle plugin, since they have the same versioning. For platform-specific...
Read more >
plugin version (1.6.10) is not the same as library - CSDN博客
kotlin提示Plugin version (1.4.32) is not the same as library version (1.4.10) 警告的官方解决办法.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found