15

I wan't to use an external library in my project. The fact is that it doesn't behave as I want, so I need to edit classes of it.

To do this, I downloaded the library as a zip folder and added it to my project using this technique How do you edit a dependency/external library in android studio?

After the project sync, I get this in gradle console:

gradle error console And here is the detail of one of those errors :

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :libs:Markwon.

Could not resolve project :libs:Markwon. Required by: project :app Unable to find a matching configuration of project :libs:Markwon: None of the consumable configurations have attributes.

I tried lot of things, like setting same buildTypes names in app build.gradle and external library build.gradle like said in threads I found about this problem. I tried with another library and result was the same.

I really don't get it guys, if you have an idea about this problem, or another solution to edit my external library, I would appreciate so much.

BNY
  • 159
  • 1
  • 1
  • 7
  • 7
    you should remove your solution and paste it as an answer, and then mark it as the accepted solution. that keeps this question from appearing unanswered to people searching for this same issue. – Jonathan E. Landrum Feb 27 '19 at 18:03

1 Answers1

3

(This text was moved from the question as per Jonathan Landrum's request)

After hours of hair pulling I found it. The problem was basically that my library project A was composed of 3 sub projects B, C and D

So initially I was trying to include the main library folder this way and compile it all

include ':libs:A' 

in settings.gradle and compile it like this

implementation project(':libs:A')

in build.gradle

So the good solution was

implementation project(':libs:A:B')

as the B project was the actual library I needed.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62