How to fix the error Cannot change strategy of configuration in gradle?

Viewed 4425

I am receiving the error trying to build the project by Gradle:

  gradle -q acRpm

FAILURE: Build failed with an exception.

* Where:
Script '/Users/anarinsky/eclipse-workspace/aaa/build/gradle-tools/build-scripts/repo-config.gradle' line: 32

* What went wrong:
A problem occurred evaluating script.
> Cannot change strategy of configuration ':fixMe' after it has been resolved.

As I understand this problem is specific for gradle version >=3.0. Yes, this script works at the 2.* version of gradle. Is there any workaround? I am on MacOs Sierra.

1 Answers

The actual reason why I got this error was the classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:x.x.x' was bundled via range (i.e. [0.11, 0.99.99]) just like their tutorial says.

Why? Because they made a new version (0.11.0) and had broken everything, so I had to manually specify previous version. This is just infuriating! Spent 4 hours on this.

Related