Skip to content

Example apps are broken if they use the old version of settings.gradle #98048

Description

@blasten

After #97823, some builds break if the app uses the older version of settings.gradle.

For example, webview_flutter_android:

 Where:
Script 'flutter/packages/flutter_tools/gradle/flutter.gradle' line: 509

* What went wrong:
A problem occurred configuring project ':path_provider'.
> Failed to notify project evaluation listener.
   > Could not find method implementation() for arguments [project ':path_provider_android'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
   > Could not find method implementation() for arguments [project ':path_provider_ios'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
   > Could not find method implementation() for arguments [project ':path_provider_linux'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
   > Could not find method implementation() for arguments [project ':path_provider_macos'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
   > Could not find method implementation() for arguments [project ':path_provider_windows'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

This can be fixed by updating settings.gradle to the latest version:
https://github.com/flutter/flutter/blob/master/packages/flutter_tools/templates/app_shared/android.tmpl/settings.gradle

cc @GaryQian for the migration tool
cc @stuartmorgan

Activity

  1. GaryQian commented on Feb 8, 2022

    @GaryQian
    Contributor

    Migration tool will be able to handle this case.

  2. GaryQian commented on Feb 8, 2022

    @GaryQian
    Contributor

    Is this important enough to revert #97823 for now? It seems that it is more common for apps to use legacy settings.gradle than use iOS only plugins

  3. blasten commented on Feb 8, 2022

    @blasten
    Author

    yes, let's revert it for now, and reland after the migration tool lands.

  4. stuartmorgan-g commented on Feb 8, 2022

    @stuartmorgan-g
    Contributor

    than use iOS only plugins

    It's more of an edge case than that; it's using a plugin that doesn't support Android but has an android/ folder. (Most likely due to sloppy updating of a plugin that used to have a dummy Android implementation since that used to be required.)

  5. added
    P2Important issues not at the top of the work list
    and removed on Feb 8, 2022
  6. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    a: pluginsSupport for writing, building, and running plugin packages
    and removed on Mar 11, 2023
  7. gnprice commented on Apr 18, 2023

    @gnprice
    Member

    The revert #98050 was landed. Is there still an open task that this issue is tracking?

    (I see that when the revert landed, the issue was lowered in priority but kept open: #98048 (comment) )

  8. stuartmorgan-g commented on Apr 18, 2023

    @stuartmorgan-g
    Contributor

    It may have been intended to track getting to the point where we can reland that change, but since the original issue is still open I don't think we need it.

  9. github-actions commented on May 2, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  10. locked as resolved and limited conversation to collaborators on May 2, 2023
  11. added a commit that references this issue on Dec 21, 2023
    f5ac225
  12. added a commit that references this issue on Dec 28, 2023
    164cf74
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: pluginsSupport for writing, building, and running plugin packagesplatform-androidAndroid applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions