I’ve been developing an Android app with openFrameworks and Android studio and all has been running smoothly until yesterday where everything stopped working all of a sudden (well, maybe I did some update, but I can’t really recall what changed). There’s something going on with Gradle, I think. I uninstalled and reinstalled Android studio and OF with no luck. Android studio can’t even build the project giving this error:
Could not find method implementation() for arguments [DefaultProjectDependency{dependencyProject='project ':ofAndroidLib'', configuration='default'}] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
When I click the “open file” link I get a file where this is highlighted:
implementation project(path: ':ofAndroidLib')
This is last line from the build.gradle file in the project’s home directory.
Also, if I try to run the project I get this error:
Gradle project sync failed. Please fix your project and try again.
I read in some places that Android studio supports an earlier version of gradle and that this should be fixed in /project_home/gradle/wrapper/gradle-wrapper.properties where the last line points to a gradle version. In my case:
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
I’m really not sure what I should do though because all the information is scattered around the internet and many things are already outdated.
Any help appreciated.