0

I am new to flutter. I have used the add 2 app concept from flutter documentation

https://docs.flutter.dev/development/add-to-app

to one of my existing android project its working fine. The issue begans with the size of my android app with flutter module was 45MB,So i decided to excluded the flutter .SO files (libapp.so,libflutter.so) and loaded them from the internal storage by downloading it from server for specific architecture("armeabi-v7a", "arm64-v8a", "x86", "x86_64") using System.loadLibrary(path+"libflutter.so").

The libflutter.so loaded successfully and i can open my flutter app,when i exclude the libapp.so files and loaded them at runtime then my flutter app crashes with following output.

Flutter Screen Logcat Error

This way I initialize my flutter engine

Intialize Code

Flutter Class

Can we load the libapp.so files of flutter dynamically?.What is the issue ?..

David
  • 1
  • 1
  • You don't have to do that, when you upload aab to google play users will download only those `.so` files that match their architecture – Dima Rostopira Jan 10 '22 at 12:02
  • Thanks for the reply,but we have not uploaded or app in playstore due to some policy issues it is downloaded from our official website – David Jan 10 '22 at 13:19
  • Then you should use abi split feature and distribute different apks for different devices – Dima Rostopira Jan 10 '22 at 13:41
  • Yeah we will use this split abi in next sprint but is there any other conclusion for this error for now – David Jan 11 '22 at 10:54
  • Still seems like a bad idea, but you can try this one: https://stackoverflow.com/questions/53773791 – Dima Rostopira Jan 11 '22 at 12:09

0 Answers0