0

在我的安卓应用中:

在 app/build.gradle 中:

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 project(':fointeraction')  
    implementation project(':reports')
    implementation project(':transport')

在模块传输传输/build.gradle:

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

    implementation 'androidx.appcompat:appcompat:1.0.2'
    api 'com.squareup.okhttp3:logging-interceptor:3.8.0'
    api "com.squareup.retrofit2:converter-gson:$RETROFIT_VERSION"
    api "com.squareup.retrofit2:retrofit:$RETROFIT_VERSION"


    implementation project(':fointeraction')

模块fointeraction使用模块transport,反之亦然

在模块 fointeraction

fointeraction/build.gradle:

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

    implementation 'com.android.support:appcompat-v7:28.0.0'
    api 'com.google.code.gson:gson:2.8.5'
    api 'commons-io:commons-io:2.6' // "api" configurations will be transitively exposed to consumers of the library
    implementation 'commons-codec:commons-codec:1.12'
    implementation 'org.apache.commons:commons-lang3:3.8.1'
    implementation 'org.apache.httpcomponents:httpclient:4.5.8'

    implementation project(':transport')

当我尝试构建时出现错误:

Circular dependency between the following tasks:
:fointeraction:compileDebugAidl
\--- :transport:compileDebugAidl
     \--- :fointeraction:compileDebugAidl (*)

(*) - details omitted (listed previously)
4

2 回答 2

1

您的 fointeraction 包括传输,其中包括 fointeraction,其中包括传输(以及 on 和 on)

于 2020-06-27T16:25:29.603 回答
0

我建议一种解决方案,但不知道它可能会有所帮助。请implementation 'com.android.support:appcompat-v7:28.0.0'fointeraction/build.gradle文件中删除并 implementation 'androidx.appcompat:appcompat:1.0.2'改用。最好在整个项目中使用 AndroidX 库,而不是单独使用。

于 2019-08-03T13:58:46.967 回答