Android build failed- cant generate Release APK
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
Hi @geniushkg
I have no idea for this issue, can you give me a reproducible example?
Resolved in https://github.com/ridvanaltun/react-native-deepar/issues/23#issuecomment-1367299602
@ridvanaltun how developers use your Library.
@ridvanaltun @shyammanek I have also same error - can't generate Release APk How to solve it?