Direct local .aar file dependencies are not supported when building an AAR. #346
Replies: 10 comments 2 replies
|
Hello @wilsolutions, @florindumitru Are you using "aar" in package.json > react-native-builder-bob > targets ? I'm actually able to embed 3 aar by removing this target option. My aar(s) are inside a Then in my Also my Android Gradle Plugin Version is in 4.2.1: |
|
Hello, the issue is still present even when setting the gradle version to 4.2.1. It will work for debug builds however release builds of apps using RN > 0.64 that use our modules will fail with: with the same description @wilsolutions posted. Does anyone have a solution that will work for the new React Native versions? |
|
did you guys find a workaround ? |
Any solution? |
|
this stackoverflow answer solved the problem for me: https://stackoverflow.com/a/73699520/10933691 |
|
Found the solution. Instead of |
|
Feels like this is still an unanswered issue, is there any workaround / solution around it? |
|
You can try to upload the local aar into a remote maven repo to solve this problem. |
|
Any solution as of now? |
Uh oh!
There was an error while loading. Please reload this page.
Hi, please, I've create a react native module that includes 2 external libraries (.aar).
It builds fine, but when I ran
npx react-native run-android example --deviceId=the_deviceit returns the following error:Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken because the classes and Android resources from any local .aar file dependencies would not be packaged in the resulting AAR. Previous versions of the Android Gradle Plugin produce broken AARs in this case too (despite not throwing this error).I'm including the .aar in the build.gradle:
implementation files('lovely/cutelib.aar')And then in the settings.gradle i do:
include ':cutelib'Note: it will run fine into Android device if I don't pass the --deviceId flag :P
Any thoughts?
ty
All reactions