I'm creating a Flutter application that includes multiple 3rd party libraries. On the Android side these libraries are .so
files and .jar
files.
The libraries are included and work great in debug builds, but in release builds the .jar
files are not included in the apk/appbundle.
I'm using this line to import the .jar files in android/app/build.gradle
:
implementation fileTree(dir: 'libs', include: ['*.jar'])
The application crashes on launch from the release build as the libraries are not present and I seem to have exhausted my Google-fu in this matter. I have everything working like this and because of time pressure on the project I'm rather hesitant to start re-creating this as a Flutter plugin.
Any suggestions on what I should do to make release builds include the libraries?