Gradle项目同步失败。基本功能无法正常工作

时间:2017-09-05 19:13:43

标签: java android android-gradle android-databinding

我运行我的项目我收到此错误:Gradle project sync failed.Basic functionality will not work properly

logcat的:

enter image description here

这是我的gradle-wrapper.properties

#Tue Sep 05 19:53:08 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

这是build.gradle(项目):

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

这是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'
        }
    }
}

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'
}
  

项目结构 - >项目:

enter image description here

1 个答案:

答案 0 :(得分:0)

您正在使用数据绑定库。

要使用它,请在module/build.gradle块中添加android

dataBinding {
        enabled = true
    }

更多info here.