Giter VIP home page Giter VIP logo

Comments (9)

pumano avatar pumano commented on August 16, 2024 1

@navaronbracke it's reproduced in 5.1.1 android build

from app_settings.

0xharkirat avatar 0xharkirat commented on August 16, 2024 1

I was getting the same issue. I just upgraded my kotlin version to 1.8.0 & build was successful.

from app_settings.

navaronbracke avatar navaronbracke commented on August 16, 2024

@emadd Does this reproduce with version 5.1.1, which was recently published? I can run the example app without issues.

from app_settings.

navaronbracke avatar navaronbracke commented on August 16, 2024

@pumano That is because older dependencies still use the kotlin-stdlib-jdk7 or kotlin-stdlib-jdk8. These two have been merged in newer releases of Kotlin.

See https://stackoverflow.com/a/75298544 for a better explanation.

But in short, you'll have to add this block (the Kotlin version is the one that you want to use, so 1.8.0 in this example)

dependencies {
    constraints {
        implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
            because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
        }
        implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
            because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
        }
    }
}

to your build.gradle. If you have apply plugin: 'kotlin-android' (which you probably do), remove these lines as well.

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

from app_settings.

pumano avatar pumano commented on August 16, 2024

@navaronbracke yes, thank you! I troubleshot it few hours ago and what I do:

update kotlin to 1.8.0
update gradle via android studio steps (few updates to gradle 8)
change kotlin-stdlib-jdk7 implementation to kotlin-stdlib
update target and source compatibility to java 17 (why not?)

Screenshot 2023-10-19 at 10 58 23

It solve problem! @navaronbracke thank you!

from app_settings.

navaronbracke avatar navaronbracke commented on August 16, 2024

Java 17 is required for using Gradle 8 ;)

app_settings supports that Gradle version, hence the namespace attribute. But we have not yet switched over to using Gradle 8 in the package itself.

from app_settings.

ex-tag avatar ex-tag commented on August 16, 2024

I personally would downgrade to app_settings: 4.3.1 which does not produce this error, rather than modify default settings that could introduce bugs for the Flutter platform and other packages.

from app_settings.

navaronbracke avatar navaronbracke commented on August 16, 2024

@ex-tag You're going to have to keep your Java / Android Studio / Gradle / Android Gradle Plugin / Kotlin version up-to-date to avoid this kind of issue anyway. The problem is that the OP had outdated versions.

from app_settings.

pumano avatar pumano commented on August 16, 2024

@navaronbracke thank you for that issue) because of you I can update my project to 17 java and latest gradle :)

from app_settings.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.