Skip to content

[Question]: Error build android since package_info_plus 3.0.1 #1290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
7 tasks done
AlexRich16 opened this issue Oct 25, 2022 · 3 comments
Closed
7 tasks done

[Question]: Error build android since package_info_plus 3.0.1 #1290

AlexRich16 opened this issue Oct 25, 2022 · 3 comments
Labels
question Further information is requested

Comments

@AlexRich16
Copy link

AlexRich16 commented Oct 25, 2022

What is your question?

I've a build error on android since I've upgrade package_info_plus 3.0.0 -> 3.0.1

A problem occurred configuring project ':package_info_plus'.
> Could not resolve all artifacts for configuration ':package_info_plus:classpath'.
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20.

build.gradle

ext.kotlin_version = '1.6.10'

classpath 'com.android.tools.build:gradle:3.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip

If i downgrade on package_info_plus 3.0.0 , it's ok ✅

Can you help me to upgrade my dependency and solve my problem ?
Thanks

Checklist before submitting a question

  • I Google'd a solution and I couldn't find it
  • I searched on StackOverflow for a solution and I couldn't find it
  • I read the README.md file of the plugin
  • I am using the latest version of the plugin
  • All dependencies are up to date with flutter pub upgrade
  • I did a flutter clean
  • I tried running the example project
@AlexRich16 AlexRich16 added the question Further information is requested label Oct 25, 2022
@rusudinu
Copy link

rusudinu commented Oct 26, 2022

you need to upgrade your gradle version, the top of your andoid\build.gradle file should look something like this:

buildscript {
    ext.kotlin_version = '1.7.20'
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.3.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.14'
    }
}

You should use Android Studio to upgrade to the latest version of the gradle plugin (open the project in android studio, and it will prompt you to upgrade the gradle plugin), make sure that com.google.gms:google-services is set to 4.3.14 otherwise gradle 7.3 won't work. After this, you may bump ext.kotlin_version to 1.7.20, and plus plugins will work accordingly.

@vbuberen
Copy link
Collaborator

vbuberen commented Dec 9, 2022

Closing as the solution was provided and no further messages from the issue reporter.

@vbuberen vbuberen closed this as completed Dec 9, 2022
@martin-braun
Copy link

martin-braun commented Dec 22, 2022

@vbuberen Which makes it incompatible with Flutter 2. I would love if the plugin would be a little bit longer compatible with an older gradle version. Version 2 was still compatible with Gradle 3 and now it requires Gradle 7. The last release of Flutter 2 is not even one year old.

Please re-open this issue, thanks.

martin-braun referenced this issue in zeshuaro/google_api_headers Dec 22, 2022
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants