Skip to content
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

Android Gradle error: Could not find method dependencyResolutionManagement() #16647

Closed
SaidiAli opened this issue Mar 25, 2021 · 5 comments
Closed
Labels
a:regression This used to work

Comments

@SaidiAli
Copy link

Expected Behavior

Android Gradle should sync project

Current Behavior

I used android studio yesterday very well, everything was okay, but suddenly today gradle is not syncing.
First I got an that the jdk location is wrong, then I select the location in the pop up but it happens again in subsequent restarts.
Also I get this error:

`A problem occurred evaluating settings 'Campus'.

Could not find method dependencyResolutionManagement() for arguments [settings_82rgr53vi202j1gwh4gt9dzgt$_run_closure1@6ee75a30] on settings 'Campus' of type org.gradle.initialization.DefaultSettings.`

This was not a problem yesterday

Context

Steps to Reproduce

create a new android project

Your Environment

Build scan URL:

@ljacomet
Copy link
Member

Please indicate the Gradle and Android versions

@SaidiAli
Copy link
Author

@ljacomet
Android Studio Arctic Fox | 2020.3.1 Canary 12
Android Gradle plugin: 7.0.0-alpha12
Gradle version 6.1.1

@ljacomet
Copy link
Member

ljacomet commented Mar 26, 2021

Gradle version 6.1.1

There is your problem: that API dependencyResolutionManagement was added in Gradle 6.8

@SaidiAli
Copy link
Author

This actually helped, I bumped my gradle version to 6.8.2 and it synced. But I think android studio has a bug because was a new project and they had to do this out of the box.
Thank you so much.

@astro-yoas
Copy link

astro-yoas commented Dec 31, 2021

hi, I also ecounter same problem with gradle version 7.0.2, this happens only when i run Gradle command
Android Studio Arctic Fox | 2020.3.1 Patch 4

com.android.tools.build:gradle:7.0.4

https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:regression This used to work
Projects
None yet
Development

No branches or pull requests

3 participants