不能使用显式的lib名称指示

时间:2019-07-03 11:00:36

标签: android-gradle

在主应用中,我使用模块绑定:

app/build.gradle:

def AAVersion = '4.6.0'

dependencies {
    annotationProcessor "org.androidannotations:androidannotations:$AAVersion"

    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.google.code.gson:gson:2.8.5'

    implementation "org.androidannotations:androidannotations-api:$AAVersion"

  implementation project(':binding')

}

在文件夹libs中的模块绑定中,我具有lib "libs/androidbinding.jar"

此处 binding / app / build.gradle:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'com.android.support:appcompat-v7:28.0.0'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

但是当我构建应用程序时,我在主应用程序中出现编译错误:

import gueei.binding.observables.StringObservable;

错误:

Cannot resolve symbol 'StringObservable'

要解决此问题,我必须在 binding / build.gradle

中使用它
compile files('libs/androidbinding.jar')

为什么我需要这样做? 如果没有这一行,是否可以解决问题?

compile files('libs/androidbinding.jar')

0 个答案:

没有答案