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.

Example example-visitors build fails: Plugin [id: 'kotlinx-serialization'] not found

See original GitHub issue

Describe the bug

Cloned the repo, opened up example-visitors, attempted to build.

Plugin [id: 'kotlinx-serialization'] was not found in any of the following sources:

- Gradle Core Plugins (not a core plugin, please see https://docs.gradle.org/4.10.3/userguide/standard_plugins.html for available core plugins)
- Plugin Repositories (plugin dependency must include a version number for this source)

Based on the second error I tried giving it a version number in build.gradle.kts:

id("kotlinx-serialization") version "1.3.41"

but then I just got

Plugin [id: 'kotlinx-serialization', version: '1.3.41'] was not found in any of the following sources:

- Gradle Core Plugins (not a core plugin, please see https://docs.gradle.org/4.10.3/userguide/standard_plugins.html for available core plugins)
- Plugin Repositories (could not resolve plugin artifact 'kotlinx-serialization:kotlinx-serialization.gradle.plugin:1.3.41')
  Searched in the following repositories:
    Gradle Central Plugin Repository

Environment

  • Kotlin version: 1.3.41
  • Library version: ???
  • Kotlin platforms: JVM
  • Gradle version: 5.5.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
essolaymanicommented, Dec 16, 2021

What id have to add to make Serialization work…!!

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


}


android {
    compileSdk 31

    defaultConfig {
        applicationId "com.essolaymany.rectoapp"
        minSdk 22
        targetSdk 31
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {

    implementation 'androidx.core:core-ktx:1.6.0'
    implementation 'androidx.appcompat:appcompat:1.4.0'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Kotlin @Serializable annotation not working in IntelliJ
The problem was that I was using the idea plugin to generate the IntelliJ project. When I instead imported the project by opening...
Read more >
Content negotiation and serialization | Ktor
The ContentNegotiation plugin serves two primary purposes: Negotiating media types between the client and server. For this, it uses the ...
Read more >
When applying Kotlinx Serialization and KMP NativeCoroutines
In this particular module that fails I only have the build logic plugin ... Plugin [id: 'com.rickclephas.kmp.nativecoroutines'] was not found in any of...
Read more >
Add kotlin-serialization plugin marker to the eap and kotlinx ...
to allow using kotlinx-serialization , eap versions of kotlin and other plugins without ... eachPlugin { if (requested.id.id == "org.jetbrains.kotlin.jvm") ...
Read more >
Kotlinx.Serialization part1 - Medium
First we need to add a new plugin to the build.gradle file: plugins { id ... (Wait a minute Kotlinx serialization not just...
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