Direct local .aar file dependencies are not supported when building an AAR. #346
Replies: 9 comments 1 reply
-
@wilsolutions did you find any solution? |
Beta Was this translation helpful? Give feedback.
-
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:
|
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
did you guys find a workaround ? |
Beta Was this translation helpful? Give feedback.
-
Any solution? |
Beta Was this translation helpful? Give feedback.
-
this stackoverflow answer solved the problem for me: https://stackoverflow.com/a/73699520/10933691 |
Beta Was this translation helpful? Give feedback.
-
Found the solution. Instead of |
Beta Was this translation helpful? Give feedback.
-
Feels like this is still an unanswered issue, is there any workaround / solution around it? |
Beta Was this translation helpful? Give feedback.
-
You can try to upload the local aar into a remote maven repo to solve this problem. |
Beta Was this translation helpful? Give feedback.
-
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_device
it 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
Beta Was this translation helpful? Give feedback.
All reactions