-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
maven_aar dependency cannot include transitive dependency #2863
Comments
Hi @SteveMunday, first of all thank you for the very detailed report. The error that you are seeing is when bazel attempts to process the resources contained in the AAR. Note that The problem is that the AAR from Jcenter itself depends on appcompat-v7. You can see that in http://jcenter.bintray.com/com/theartofdev/edmodo/android-image-cropper/2.3.1/android-image-cropper-2.3.1.pom Your BUILD file makes and android_library and an android_binary depend on appcompat-v7, but @android_image_cropper//aar is an Unfortunately this is not something that you will be able to do with the maven_aar rule right now. I suppose I should probably add a Workaround with http_file:
For the Maybe @kchodorow can comment on the future of/prioritization of transitive maven rules and if it would be a reasonable idea to add a |
(Oops, did not mean to close.) |
Submit a detailed report, receive a detailed answer. 😄 Thanks for suggesting a workaround with an |
Description of the problem / feature request / question:
I'm trying to convert a fairly sizeable Android app build from Gradle to Bazel, to better manage our mono-repo. The app has a number of library dependencies including 2 aar's, and I'm having trouble building this library: https://github.com/ArthurHub/Android-Image-Cropper
I found the
maven_aar
build rule and have implemented that correctly (I think). Even so, I'm getting errors fromaapt
validating resources in this library. This library builds and runs using Gradle.If possible, provide a minimal example to reproduce the problem:
Here it is, building this will produce the error.
https://github.com/SteveMunday/bazel_aar_test
Environment info
Operating System:
MacOS Sierra 10.12.2
Bazel version (output of
bazel info release
):Built from source at: bc133cb
Have you found anything relevant by searching the web?
This StackOverflow answer references a similar error message, which indicates that we might be missing the
appcompat-v7
library, but I confirmed that this is correctly imported. It's an older answer so thecompileSdkVersion
is no longer relevant.No Resource Identifier found error,
I thought this might be related, which was why I tried building from source. I did everything suggested here, no help.
appcompat-v7 support library missing,
This is what I referenced for how to use
maven_aar
:maven_aar
Anything else, information or logs or outputs that would be helpful?
Complete Bazel log output:
https://gist.github.com/SteveMunday/903f4e1e526119a004c8bcb47bb0dc16
The text was updated successfully, but these errors were encountered: