Error:Configuration with name 'default' not found

Hi,

I am trying to adding .jar files to my android project (I am using Android Studio). Did everything that was explained here

https://www.youtube.com/watch?v=1MyBO9z7ojk I added a directory named libraries, copied the files in, and then compiled it.

my build.gradle looks like this

dependencies {

compile fileTree(include: [’*.jar’], dir: ‘libs’)

compile ‘com.android.support:appcompat-v7:21.0.3’

compile project(’:libraries’)

}

my settings.gradle looks like this

include ‘:app’ include ‘:libraries’

But now I get the error Error:Configuration with name ‘default’ not found.

What did I do wrong ?

Thanks in advance !

First rule of debugging anything in your life: Search for the message on the internet: https://www.google.com/search?q="Configuration+with+name+'default'+not+found."&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox&channel=sb .

The common answer seems to be that you’re trying to use a project that doesn’t have a “build.gradle” file. Is that the case here?

I did search it but couldn’t find anything, my project does have a build.gradle file as I explained it looks like this

dependencies {

compile fileTree(include: [’*.jar’], dir: ‘libs’)

compile ‘com.android.support:appcompat-v7:21.0.3’

compile project(’:libraries’)

}

It might help to show your exact folder structure and where significant files are.

Did you review the pages shown by that search result?

yes I did, the first 8 pages, they are way to specific,

I solved it though, I just copied the .jar files into the libs folder, that works because it is the directory that is referenced here

compile fileTree(include: [’*.jar’], dir: ‘libs’)

Thanks anyways

So your jar files are in the “libraries” subproject, but you’ve now copied the same jars into the “libs” subdirectory of the main project, and now it works? If so, that likely confirms that there’s something wrong with the “libraries” subproject. You certainly didn’t “solve” it, as this is just an accidental hack that manages to not fail your build. Hopefully someone else has a suggestion that might provide more information.

I don’t think so, I created a new project and copied the jar files in the libs folder, so gradle can compile them. I’ve done it with again with another project just to check and seems like it works.

the compile tree code posted above is standard

I’m using Android Studio not eclipse

So I assume you’ve gotten rid of the “libraries” subproject? I suppose that’s just as well, there’s not much point in having a subproject just to contain dependencies.

oh yeah, I deleted everything uneccessary, i just copied the jar files in that folder