我从 Git Hub 克隆了 repo,并完成了所有提到的步骤,没有任何错误。
接下来,我开始了一个新项目,并在我的应用程序下添加了库,如https://coderwall.com/p/eurvaq/tesseract-with-andoird-and-gradle中所述。
当我将build.gradle添加到 tess-two 目录时,同步完成后出现错误
错误:未找到名称为“默认”的配置。
我尝试了很多解决但无法解决它。需要你的帮助来找出错误。
tess-two 下的 build.gradle 文件
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']
}
}
事件簿
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)
日志文件 http://pastebin.com/WVxxmm1c
应用程序的settings.gradle
include ':app'
include 'app:libraries'
include 'app:libraries:tess-two'