Giter VIP home page Giter VIP logo

Comments (12)

erf avatar erf commented on May 10, 2024 1

It's a third party dependency, but it was fixed in the one i changed to

from flutter.

AbdeMohlbi avatar AbdeMohlbi commented on May 10, 2024

I suggest you provide the settings.gradle file after trying to migrate i think you have a simple error

from flutter.

erf avatar erf commented on May 10, 2024

@AbdeMohlbi i added the various gradle files - what do you mean "i think you have a simple error" ? I've provided the log when trying to run app, it seem to complain about the agpVersion as I've already mentioned.

from flutter.

AbdeMohlbi avatar AbdeMohlbi commented on May 10, 2024

i think there was a bug bacause none of your files was showed up to me
anyway, this is an exemple of how the settings.gradle file should look ,just change this section with the vserions according to your kotlin compiler :

plugins {
    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
    id "com.android.application" version "7.3.0" apply false
    id "org.jetbrains.kotlin.android" version "1.9.0" apply false
}

include ":app"

from flutter.

erf avatar erf commented on May 10, 2024

@AbdeMohlbi try refresh the issue. I've just used the settings.gradle file as described here

Also - could you please format your code and check your spelling.

from flutter.

AbdeMohlbi avatar AbdeMohlbi commented on May 10, 2024

also you can find the version of your kotlin compiler here (if ur using android studio )
l

i hope this could help you also relove this line :
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
[https://github.com//issues/145288]
see here brother some guy had the same issue last week if i remeber correctly

from flutter.

erf avatar erf commented on May 10, 2024

@AbdeMohlbi did you read my issue / error message?

Plugin [id: 'com.android.application', version: '{agpVersion}', apply: false] was not found in any of the following sources:

from flutter.

AbdeMohlbi avatar AbdeMohlbi commented on May 10, 2024

brother it's saying that this two are not defined , so you have to define them manualy , in the docs it's writing that :

The AGP version is the number that comes at the end of the line classpath 'com.android.tools.build:gradle:7.3.0', so 7.3.0 in this case. Similarly, the kotlin version comes at the end of the line ext.kotlin_version = '1.7.10', in this case 1.7.10.

Next, replace the contents of <app-src>/android/settings.gradle with the below, remembering to replace {agpVersion} and {kotlinVersion} with previously identified values

and also i have provided an exemple of one of my own files here again:

pluginManagement {
    def flutterSdkPath = {
        def properties = new Properties()
        file("local.properties").withInputStream { properties.load(it) }
        def flutterSdkPath = properties.getProperty("flutter.sdk")
        assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
        return flutterSdkPath
    }
    settings.ext.flutterSdkPath = flutterSdkPath()
    includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}

plugins {
    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
    id "com.android.application" version "7.3.0" apply false
    id "org.jetbrains.kotlin.android" version "1.9.0" apply false
}
include ":app"

and remove this line from app/build.gradle :

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

i hope it's clear now

from flutter.

erf avatar erf commented on May 10, 2024

Ah i see now! I thought you had to define those as variables somewhere - but these are just placeholders for the actual value 🤦‍♂️

Thanks for your help.

from flutter.

AbdeMohlbi avatar AbdeMohlbi commented on May 10, 2024

also check ths issue i have mentioned before you will find there if you need to delete this line(acording to the author of that issue):
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

from flutter.

erf avatar erf commented on May 10, 2024

I removed that. Probably unrelated but now i got the following error now (used by flutter_local_notifications package)

* 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 ':flutter_native_timezone' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

Do you have any idea?

Update: Nevermind i got it working using the flutter_timezone.

from flutter.

AbdeMohlbi avatar AbdeMohlbi commented on May 10, 2024

brother it's clear that it suggest you use 1.5.20 version or higher just change it from the file
edit i suggest u provide how did u solve ur prblm in case someone in the near future may trip in the same issue and thank u

from flutter.

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.