【问题标题】:Sync failed - Error about DatabindingBuilder同步失败 - 关于 DatabindingBuilder 的错误
【发布时间】:2018-02-14 06:17:13
【问题描述】:

为什么当我点击“run”时我的项目没有运行?

我得到了这个面板:

BUILD.GRADLE:

apply plugin: 'com.android.application'


android {
    compileSdkVersion 23
    buildToolsVersion '25.0.3'


    defaultConfig {
        applicationId "info.androidhive.materialtabs"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dataBinding{
        enabled = true
    }

}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:design:23.3.0'
    compile 'com.android.support:support-v4:23.3.0'
    compile files('libs/tinydb-0.0.9.jar')
    compile files('libs/droidText.0.2.jar')
    compile files('libs/gson-2.2.2.jar')
    compile files('libs/jipsi.jar')
    //    compile 'com.android.support:appcompat-v7:23.1.1'
    //    compile 'com.android.support:design:23.1.1'
    compile 'com.mcxiaoke.volley:library-aar:1.0.0'
    compile 'net.gotev:uploadservice:2.1'
    compile files('libs/jipsi_055b734e299151494aa487f8b477464882efb509.jar')
    //compile 'com.android.support:design:23.3.0'
}

LOGCAT

【问题讨论】:

  • 您是否尝试过关闭项目并重新导入导入项目?
  • 您可以在消息窗口中查看有关错误的更多具体信息...
  • 我得到了这个:错误:(1, 0) android/databinding/tool/DataBindingBuilder 打开文件
  • 分享你的 build.gradle 和 logcat
  • @MalikAhsan 我添加了 gradle 和 logcat

标签: java android


【解决方案1】:

确保在你的项目级别 build.gradle jcenter() 是这样添加的

allprojects { repositories { mavenCentral()  jcenter() }}

也检查一下

Gradle couldn't find com.android.databinding:dataBinder:1.0-rc0

这会对你有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多