saki4510t/UVCCamera

Android app crashing when using multiple .aar libraries

shangmxd opened this issue · 0 comments

I have integrated two .aar libraries into my Android application: "libuvccamera-release.aar" for USB camera functionality and "snpe-release.aar" for utilizing the Snapdragon Neural Processing Engine. These libraries contain several ".so" files, including "libc++_shared.so."
During the build process, I encountered the following error:
2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs

I tried resolving it using the packagingOptions{ pickFirst } and packagingOptions { exclude 'lib/arm64-v8a/libc++_shared.so' }in my gradle file.

However, after implementing the first solution, my app now crashes when attempting to use the USB camera functionality with a crash64dump and when using the second method, my app does not build as I am using a Mapbox map provider which requires the libc++_shared.so library to work.

Can you please help me out in resolving this issue without compromising the functionality of either the USB camera or the Snapdragon Neural Processing Engine. How can I properly configure my project to avoid the "_2 files found with path 'lib/arm64-v8a/libc++shared.so' from inputs" error while ensuring that both libraries work as intended in my Android application?