You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- 9Not sure how this answer ever helped anyone. Google states: "You can't use the compileOnly configuration with AAR dependencies." in their docs: developer.android.com/studio/build/dependenciesDarkNeuron– DarkNeuron2021-03-30 08:30:15 +00:00Commented Mar 30, 2021 at 8:30
- 1@DarkNeuron that's because the OP's use case is different: you have a library project that compiles to an aar which also depends on other aars. So for this case, compileOnly works with the caveats noted in my answer (i.e., you have to include the aar dependencies that are compile only in the project consuming the library)Luis– Luis2021-03-30 23:33:16 +00:00Commented Mar 30, 2021 at 23:33
- 1What? No no, my use case was exactly the same: Was building a library that used an AAR. I posted the above because it did NOT work. Everything compiled, but the library was missing from the final bundle. Which left me confused until I saw that note by Google. In any case I solved my aar problem by extracting the jar file contained within. Which might not work for everyone.DarkNeuron– DarkNeuron2021-04-01 11:17:31 +00:00Commented Apr 1, 2021 at 11:17
- 2@Żabojad then you didn't understand the above answer. You have to include the dependencies.Luis– Luis2022-02-08 05:01:14 +00:00Commented Feb 8, 2022 at 5:01
- 1How to include the aar dependencies on the application project that consumes your library ? how to publish your aar dependencies to a maven repository ? @LuisAhmed Eid– Ahmed Eid2022-09-22 09:00:14 +00:00Commented Sep 22, 2022 at 9:00
| Show 5 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. python-3.x), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
default