Build failed Android

Task :react-native-deepar:bundleDebugAar FAILED
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:react-native-deepar:bundleDebugAar’.

Error while evaluating property ‘hasLocalAarDeps’ of task ‘:react-native-deepar:bundleDebugAar’
Direct local .aar file dependencies are not supported when building an AAR.

This happens when trying to build APK when using instructions as mentioned in React native example as shared on official demo projects

Hi @hardik_goswami

Sorry you are having issues.

Have you tried the methods of importing the aar file suggested here:

Could you also let us know which gradle version you have?

Yes have tried with that also , the problem occurs when generating build , if we run on debug - connected device it will run

But while release generating build linking causes error
simillar to this but deep ar based native files related to tensorflowlite etc

So I included pickFirst to resolve above issue
packagingOptions {
pickFirst ‘lib/arm64-v8a/libnative-lib.so’
pickFirst ‘lib/arm64-v8a/libtensorflowlite_c.so’
pickFirst ‘lib/arm64-v8a/libtensorflowlite_gpu_delegate.so’
pickFirst ‘lib/arm64-v8a/libxzimgSDK.so’
pickFirst ‘lib/armeabi-v7a/libnative-lib.so’
pickFirst ‘lib/armeabi-v7a/libtensorflowlite_c.so’
pickFirst ‘lib/armeabi-v7a/libtensorflowlite_gpu_delegate.so’
pickFirst ‘lib/armeabi-v7a/libxzimgSDK.so’
pickFirst ‘lib/x86/libnative-lib.so’
pickFirst ‘lib/x86/libtensorflowlite_c.so’
pickFirst ‘lib/x86/libtensorflowlite_gpu_delegate.so’
pickFirst ‘lib/x86/libxzimgSDK.so’
pickFirst ‘lib/x86_64/libnative-lib.so’
pickFirst ‘lib/x86_64/libtensorflowlite_c.so’
pickFirst ‘lib/x86_64/libtensorflowlite_gpu_delegate.so’
pickFirst ‘lib/x86_64/libxzimgSDK.so’
}

Now the problem is it comes to full circle - If I do pickFirst then Error while evaluating property ‘hasLocalAarDeps’

If I dont do Pick first then previous issue also get 2 files found with same lib native issue occurs

Gradle version 7.3.3
Android Gradle plugin 7.1.1

Thank you for reporting.
A 3rd party developed the plugin in question. Could you please also post this issue on the GitHub page as well?

We will also have a look, but the author of the plugin isn’t one of the admins.

1 Like

I have raised issue on github as well for same