I cloned the repo from Git Hub, and did all the stepts mentioned without any errors.
Next i started a new project and added libraries under my app as mentioned in https://coderwall.com/p/eurvaq/tesseract-with-andoird-and-gradle.
When i add build.gradle to tess-two directory i get an error after the sync is completed
Error:Configuration with name 'default' not found.
I tried a lot to resolve but wasn't able to fix it. Need your help guys to figure out the error.
build.gradle file under tess-two
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
}
sourceSets.main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
res.srcDirs = ['res']
jniLibs.srcDirs = ['libs']
}
}
Event Log
8:59:46 AM Gradle sync started
9:00:12 AM Gradle sync failed: Configuration with name 'default' not found.
Consult IDE log for more details (Help | Show Log)
9:00:33 AM Gradle sync started
9:00:35 AM Gradle sync failed: Configuration with name 'default' not found.
Consult IDE log for more details (Help | Show Log)
9:00:56 AM Gradle sync started
9:00:58 AM Gradle sync failed: Configuration with name 'default' not found.
Consult IDE log for more details (Help | Show Log)
Log file http://pastebin.com/WVxxmm1c
settings.gradle of app
include ':app'
include 'app:libraries'
include 'app:libraries:tess-two'
Your issue is here:
include ':app'
include 'app:libraries' //REMOVE THIS LINE!
include 'app:libraries:tess-two'
Since you are defining include 'app:libraries'
, Gradle is expecting a build.gradle
file inside the app/libraries folder.
Configuration with name 'default happens because gradle doesn't find this file, or if inside the build.gradle
file Gradle doesn't find the default configuration.