react-native-deepar icon indicating copy to clipboard operation
react-native-deepar copied to clipboard

Android build failed- cant generate Release APK

Open geniushkg opened this issue 3 years ago • 4 comments

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 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 for tensorflowlite gpudelegate etc

Gradle version 7.3.3 Android Gradle plugin 7.1.1

geniushkg avatar Sep 05 '22 22:09 geniushkg

Hi @geniushkg

I have no idea for this issue, can you give me a reproducible example?

ridvanaltun avatar Sep 06 '22 23:09 ridvanaltun

Resolved in https://github.com/ridvanaltun/react-native-deepar/issues/23#issuecomment-1367299602

Dhruv2110 avatar Dec 29 '22 12:12 Dhruv2110

@ridvanaltun how developers use your Library.

shyammanek avatar Oct 10 '23 13:10 shyammanek

@ridvanaltun @shyammanek I have also same error - can't generate Release APk How to solve it?

ZhaoXianMu avatar Oct 20 '23 14:10 ZhaoXianMu