# Build failed Android

**URL:** <https://forum.deepar.ai/t/build-failed-android/70>\
**Category:** SDK\
**Created:** [September 5, 2022, 1:02pm UTC](https://forum.deepar.ai/t/build-failed-android/70 "2022-09-05T13:02:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hardik\_goswami](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/hardik_goswami/32/101_2.png) [@hardik\_goswami](https://forum.deepar.ai/u/hardik_goswami)\
**Post date:** [September 5, 2022, 1:02pm UTC](https://forum.deepar.ai/t/build-failed-android/70/1 "2022-09-05T13:02:02Z")

</div>

> 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

> **[GitHub - ridvanaltun/react-native-deepar: Snapchat-like filters, AR lenses,...](https://github.com/ridvanaltun/react-native-deepar)**
>
> Snapchat-like filters, AR lenses, and real-time facial animations. - GitHub - ridvanaltun/react-native-deepar: Snapchat-like filters, AR lenses, and real-time facial animations.

---

<div class="post-metadata">

**Author:** ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)\
**Post date:** [September 5, 2022, 1:49pm UTC](https://forum.deepar.ai/t/build-failed-android/70/2 "2022-09-05T13:49:24Z")

</div>

Hi @hardik_goswami

Sorry you are having issues.

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

> <https://stackoverflow.com/questions/60878599/error-building-android-library-direct-local-aar-file-dependencies-are-not-supp>

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

---

<div class="post-metadata">

**Author:** ![hardik\_goswami](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/hardik_goswami/32/101_2.png) [@hardik\_goswami](https://forum.deepar.ai/u/hardik_goswami)\
**Post date:** [September 5, 2022, 5:22pm UTC](https://forum.deepar.ai/t/build-failed-android/70/3 "2022-09-05T17:22:18Z")

</div>

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](https://stackoverflow.com/questions/70890854/2-files-found-with-path-lib-arm64-v8a-libc-shared-so-from-inputs-react-na)

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**

---

<div class="post-metadata">

**Author:** ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)\
**Post date:** [September 5, 2022, 5:46pm UTC](https://forum.deepar.ai/t/build-failed-android/70/4 "2022-09-05T17:46:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hardik\_goswami](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/hardik_goswami/32/101_2.png) [@hardik\_goswami](https://forum.deepar.ai/u/hardik_goswami)\
**Post date:** [September 5, 2022, 10:13pm UTC](https://forum.deepar.ai/t/build-failed-android/70/5 "2022-09-05T22:13:18Z")

</div>

I have raised issue on github as well for same

> <https://github.com/ridvanaltun/react-native-deepar/issues/16>
>
> Task :react-native-deepar:bundleDebugAar FAILED
> FAILURE: Build failed with an e…xception.
> 
> 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 running on Debug mode / connected device works fine but cant generate build.
> 
> 
> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* To Overcome \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 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
> \[https://stackoverflow.com/questions/70890854/2-files-found-with-path-lib-arm64-v8a-libc-shared-so-from-inputs-react-na\](url)
> for tensorflowlite gpudelegate etc
> 
> Gradle version 7.3.3
> Android Gradle plugin 7.1.1
