Manoel Aranda Neto
—When building an Android APK with a segmented —target-platform argument.
flutter build apk --target-platform=android-arm
FlutterLoader: Flutter initialization failed. java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dlopen failed: library "libflutter.so" not found. at java.util.concurrent.FutureTask.report(FutureTask.java:123) at java.util.concurrent.FutureTask.get(FutureTask.java:193) at io.flutter.embedding.engine.f.c.b(Unknown Source:23) at io.flutter.embedding.engine.a.<init>(Unknown Source:158) at io.flutter.embedding.engine.a.<init>(Unknown Source:16) at io.flutter.embedding.android.e.w(Unknown Source:106) at io.flutter.embedding.android.e.h(Unknown Source:7) at io.flutter.embedding.android.d.onCreate(Unknown Source:20) at android.app.Activity.performCreate(Activity.java:8000) at android.app.Activity.performCreate(Activity.java:7984) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
When an Android App bundles multiple native libraries for multiple ABIs, the —target-platform only splits out Flutter’s native library and not the App’s native libraries.
Flutter’s build system only includes the libflutter.so for the targeted platform to the final APK. But the App’s native libraries still contain the native libraries for every platform, so when running an APK in compatible mode (64 bit device using 32 bit APK), it’s not able to load Flutter’s native library (as it’s missing).
flutter build apk --target-platform=android-arm --split-per-abi
The —split-per-abi argument should be used as well.
Flutter’s build system splits out the App’s native libraries as well (in addition to Flutter’s native library), so when running an APK in compatible mode (64 bit device using 32 bit APK), it’d still be able to load the native libraries correctly.
Tasty treats for web developers brought to you by Sentry. Get tips and tricks from Wes Bos and Scott Tolinski.
SEE EPISODESConsidered “not bad” by 4 million developers and more than 100,000 organizations worldwide, Sentry provides code-level observability to many of the world’s best-known companies like Disney, Peloton, Cloudflare, Eventbrite, Slack, Supercell, and Rockstar Games. Each month we process billions of exceptions from the most popular products on the internet.
Here’s a quick look at how Sentry handles your personal information (PII).
×We collect PII about people browsing our website, users of the Sentry service, prospective customers, and people who otherwise interact with us.
What if my PII is included in data sent to Sentry by a Sentry customer (e.g., someone using Sentry to monitor their app)? In this case you have to contact the Sentry customer (e.g., the maker of the app). We do not control the data that is sent to us through the Sentry service for the purposes of application monitoring.
Am I included?We may disclose your PII to the following type of recipients:
You may have the following rights related to your PII:
If you have any questions or concerns about your privacy at Sentry, please email us at compliance@sentry.io.
If you are a California resident, see our Supplemental notice.