Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot add task 'explodeAndroidx.fragmentFragmentDebug' as a task with that name already exists. #398

Open
SagarShedge25 opened this issue Sep 9, 2022 · 3 comments

Comments

@SagarShedge25
Copy link

Describe the issue
I am, trying to build an aar lib but facing below issue, Does anybody has faced similar issue or help me if you aware about it. Thanks

  • Exception is:
    A problem occurred configuring project ':prlib'.

Cannot add task 'explodeAndroidx.fragmentFragmentDebug' as a task with that name already exists.

  • Try:

Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

Build Environment

  • Operating System: [MacOS]
  • Gradle Plugin Version: [7.2.1]
  • Gradle Version: [gradle-7.4.2-bin.zip]
  • Fat-aar Version: [1.3.8]
@clement-hardouin-idnow
Copy link

clement-hardouin-idnow commented Sep 15, 2022

I encountered the same issue with transitive option enabled.
See #204

@TsClown
Copy link

TsClown commented Oct 18, 2022

我的依赖里面用了DataBinding导致lifecycle冲突,类似的androidX的包冲突了,排查同一个模块下带有androidX依赖的其他包,然后去掉这些依赖。这个模块的aar就能打成功了。

dependencies {
    implementation("androidx.databinding:databinding-adapters:7.1.2")
    implementation("androidx.databinding:databinding-ktx:7.1.2"){
        exclude(group: 'org.jetbrains.kotlin')
        exclude(group: 'androidx.lifecycle')
    }
    implementation("androidx.databinding:databinding-runtime:7.1.2") {
        exclude(group: 'androidx.lifecycle')
    }
    embed("androidx.appcompat:appcompat:${versions.appcompat}")
}

如果使用DataBinding的话,没法使用以下的方法,只能单独添加依赖,如上代码

buildFeatures{
      dataBinding true
}

@GirlFriendNotFind
Copy link

我也遇到这个错误,请问找到解决办法了吗?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants