0

我正在使用以下版本的 Android Studio:3.5.1

classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'me.tatarka:gradle-retrolambda:3.7.1'

project.ext.minSdkVersion = 21
project.ext.compileSdkVersion = 27
project.ext.buildToolsVersion = '27.0.3'
project.ext.supportLibVersion = '27.0.0'

并在应用程序中

dataBinding {
        enabled = true
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

和 gradle wrapper 属性是:

distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

现在我想更新项目 gradle。

classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'me.tatarka:gradle-retrolambda:3.7.1'// we cannot use it for gradle updated versions 

project.ext.minSdkVersion = 21
project.ext.compileSdkVersion = 28
project.ext.buildToolsVersion = '28.0.2'
project.ext.supportLibVersion = '28.0.0'

这里它显示了删除retrolambda的错误,显示了影响项目的lambda方法的compileOptions remove。

每当我尝试更新 gradle 版本时,只有 3.0.0 没有任何其他项目 ext 更新它向我显示绑定错误 BR。

在此处输入图像描述

请检查 gradle 中的所有依赖项。

dependencies {
    //    testCompile 'junit:junit:4.12'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile "com.android.support:appcompat-v7:$rootProject.supportLibVersion"
    compile "com.android.support:support-v4:$rootProject.supportLibVersion"
    compile "com.android.support:recyclerview-v7:$rootProject.supportLibVersion"
    compile "com.android.support:cardview-v7:$rootProject.supportLibVersion"
    compile "com.android.support:customtabs:$rootProject.supportLibVersion"
    compile "com.android.support:design:$rootProject.supportLibVersion"
    //mvp library
    compile 'de.appsfactory:mvp:2.+'
    //date and time joda library
    compile 'net.danlew:android.joda:2.10.3'
    compile 'com.shawnlin:number-picker:2.4.2'
    compile 'net.hockeyapp.android:HockeySDK:5.2.0'
    compile 'org.greenrobot:greendao:3.2.2'
    compile 'com.reginald.swiperefresh:library:1.1.2'
    compile 'io.swagger:swagger-annotations:1.5.24'
    compile 'net.openid:appauth:0.7.0'//unable to update 0.7.1
    //dynamically dimensions library
    compile 'com.intuit.sdp:sdp-android:1.0.5'
    compile 'com.google.guava:guava:24.1-android'//unable to update 24.1-jre
    compile 'com.google.android.gms:play-services-auth:16.0.1'
    compile 'com.google.android.gms:play-services-fitness:16.0.1'

    //multidex
    compile 'com.android.support:multidex:1.0.3'
    compile 'com.wrbug:editspinner:1.1.0'

    compile('cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:1.1.2') {
        exclude module: 'support-v4'
    }
    compile 'org.jsoup:jsoup:1.10.2'
    //rxble library
    compile 'com.polidea.rxandroidble2:rxandroidble:1.10.3'
    compile 'io.reactivex.rxjava2:rxjava:2.2.8'
    compile 'io.reactivex.rxjava2:rxandroid:2.1.0'
    compile 'com.jakewharton.rx2:replaying-share:2.1.0'
    compile 'com.google.android.gms:play-services-base:16.1.0'

    //photo libraries
    compile 'com.github.chrisbanes:PhotoView:2.1.3'
    compile 'com.github.bumptech.glide:glide:3.8.0'

    compile 'com.google.code.gson:gson:2.8.2'
    compile 'com.squareup.retrofit2:retrofit:2.3.0'
    compile 'com.squareup.retrofit2:converter-gson:2.3.0'
    compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
    compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
    compile 'de.hdodenhof:circleimageview:3.0.0'


}

我收到如下错误:错误:com.android.databinding.library.baseAdapters 包不存在错误:找不到符号类 BR

4

1 回答 1

0

请尝试此解决方案:

项目毕业。

dependencies {
     classpath 'com.android.tools.build:gradle:3.3.2'
 }
于 2019-11-04T12:33:56.543 回答