-
Notifications
You must be signed in to change notification settings - Fork 157
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
AmbiguousVariantSelectionException with Android Gradle 3.0 #139
Comments
I think you are seeing the same issue I am seeing and reported here as well. I actually have had a support ticket open since the release of 3.0 to the masses. I think it has to do with how they parse everything for POM generation. |
@hansinator85, @cfsbhawkins, Command line to run the example: Output:
Can you please try running the example, it might help us troubleshot the issues you are having. |
Do we have to have the following line? Problem I have with this is the fact that this now build debug, release, all of my build flavors runs lint and tests. I would prefer to do as I used to since this is done via a CI machine and call ./gradlew assembleDebug artifactoryPublish and it just upload the resulting artifacts from the previous build. Problem I have with requiring my artifactoryPublish to run my builds is this now takes over 8 minutes on my machine to build. (I have a lot of modules and product variants) |
@cfsbhawkins, |
@romangurevitch your example link is broken... could you restore it, please? |
@billyjoker, |
I am also getting this problem. I have created a sample project that should help replicate the issue: |
I am having exactly the same problem. And just that we don't go in the wrong direction, I am not using any publishing config inside of the project (all deployment config is hapening in jenkins). I am only having my build config in Gradle, so I don't think the publishing config is causing is issue... I have many modules and I am using a lot of dependencies, one of them is Firebase. I am doubting this is related to Firebase. |
Hi, we're seeing the same issue with the Jenkins Artifactory plugin 2.16.1. We don't use the Artifactory Gradle plugin in our Gradle file directly but rather the Jenkins plugin. The builds started to fail with the same/similar failure:
Just in case, it's an Android project that has multiple Gradle modules and uses Gradle 4.6 & com.android.tools.build:gradle:3.1.2 |
I reproduced this issue using the sample project provided by @agent826 (Thanks you @agent826).
I opened issue gradle/gradle#5426 to the gradle team, hoping to get some guidance on the best approach to handle this exception. |
Does anyone found at least a workaround to this? |
This is biting us too and we wonder does anybody at least know a way to work around this? |
I'm also getting this issue. I've reached out to JFrog Support email but haven't heard anything yet. |
I also got the same issue, using android gradle plugin 4.0.0. I got 3 modules: app, demo and library itself. app is used for visual and demo and library are both libs. |
My workaround is to not use this plugin. I switched to the Plugin documentation: https://docs.gradle.org/current/userguide/publishing_maven.html#publishing_maven |
Greetings from the world of tomorrow! This is still happening in late 2021 with the latest plugin version 4.24.23 EDIT: this issue can be trivially reproduced using the sample project https://github.com/jfrog/project-examples/tree/master/gradle-examples/gradle-android-example by adding a second library module e.g. lib2 and then add a project dependency on 'lib2' in the 'library' module's build.gradle e.g. EDIT2: it's possible to work around this issue by changing the project dependency to |
Hi. I'm still facing this problem with plugin version 4.29.0 and the work around seems to cause other issues. Basically, when adding the specific Has there been any progress on resolving? Or any other potential workarounds (other than not using the plugin)? |
IIRC the 'solution' I went with was to remove the
For whatever reason, when I don't use the |
Hi, I am still facing the issue with plugin 7.4.2 version. Even with maven publish, I am getting the error.Are there any alternative workarounds that have been successful in resolving this issue for others? |
@Sanheethaa, |
@Sanheethaa what is your Gradle Artifactory plugin version? |
That was 4.24.9. With 5.1.0, the issue is not seen. thank you so much. |
Since upgrading to Android Gradle 3.0 (actually 3.0.1) with Gradle 4.3 we are not getting dependencies anymore.
The build info is not showing any dependencies. When doing the
artifactoryPublish
with--debug
we see the following error occur (might be the issue?):We have a multi module project with kind of following structure (i'll try to describe as good as possible, can't give you the project of course and would take some time to construct a sample):
Working old configuration with Android Gradle 2.3.3 and Gradle 3.3
Current configuration with Android Gradle 3.0.1 and Gradle 4.3
So we removed
publishNonDefault
and instead of compile with separate configuration specification we useapi
as stated by the android documentation.Use variant-aware dependency management
The application builds as expected. So the dependencies seem to be defined correctly, but somehow there is an issue during resolving for build info dependencies.
The text was updated successfully, but these errors were encountered: