I'm using android studio and i want to add an external library project to my main project from GitHub.com. I have created a folder named libs and add the whole module to it.Then like what is told in github i added this line of code to build.gradle file
compile 'org.apmem.tools:layouts:1.10@aar'
But i could not build my project and received this error
Error:(9, 1) A problem occurred evaluating root project 'MyProject'. Could not find method compile() for arguments [org.apmem.tools:layouts:1.10@aar] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
After searching about this problem find a solution here and follow steps which has described there.
But now i receive this error
Error:A problem occurred configuring project ':app'. Cannot evaluate module android-flowlayout-master : Configuration with name 'default' not found.
EDIT : my build.gradle file
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
compile 'org.apmem.tools:layouts:1.10@aar'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}