0

I'm trying to contribute to an open source project from Mapzen called "On the Road". (Github link)

I would like to edit and add some code to the project. At the moment I'm including the project using gradle with the following dependency:

compile 'com.mapzen:on-the-road:1.1.1'

Someone gave me a tutorial on how to do this here, but I'm getting a gradle error;

Error:Configuration with name 'default' not found.

What I did was clone the project from github, copied the entire master folder into my apps main and renamed it to "customLibrary".

I then added include':customLibrary' to my settings.gradle and compile project(':customLibrary') to my build.gradle(Module:app) file.

How do I import this project without the errors?

Community
  • 1
  • 1
Kenneth Breugelmans
  • 501
  • 1
  • 8
  • 22

1 Answers1

0

As you cloned the entire master folder, inside the customLibrary there is the build.gradle file which is the top-level file of the library.

You can't do it.

Since you are including the customLibrary folder, gradle is looking for a module build.gradle.

You have to clone the library folder instead of the entire master folder.
Otherwise you can use include':customLibrary:library' only to add the module library of the entire project.

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
  • When I try this, I get the following error from gradle;` `Error:(21, 0) No service of type Factory available in ProjectScopeServices.` this links to ; `apply plugin: 'com.github.dcendents.android-maven'` – Kenneth Breugelmans Feb 13 '17 at 12:39
  • If anyone is looking for the same answer; I solved it by changing the version of `classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3.0' ` to 1.4.1 in the build.gradle file from the library. And then comment out the following line in customLibrary build.gradle file `//classpath 'com.android.tools.build:gradle:2.2.3'` – Kenneth Breugelmans Feb 13 '17 at 12:44