The current Android support package no longer includes x86 libraries. However, Gradle defaults to building libnative-lib.so for all ABIs, so the APK contains the following:
Because there's at least one x86 library in the APK, it can still be installed on x86 emulators, but it crashes on startup with the following error:
06-26 19:28:35.377 2874 2874 E MainActivity: Failed to create Python app
06-26 19:28:35.377 2874 2874 E MainActivity: java.lang.RuntimeException: Unable to find file matching pythonhome.* and x86.zip
06-26 19:28:35.377 2874 2874 E MainActivity: at org.beeware.android.MainActivity.unpackPython(MainActivity.java:134)
06-26 19:28:35.377 2874 2874 E MainActivity: at org.beeware.android.MainActivity.startPython(MainActivity.java:201)
06-26 19:28:35.377 2874 2874 E MainActivity: at org.beeware.android.MainActivity.onCreate(MainActivity.java:249)
06-26 19:28:35.377 2874 2874 E MainActivity: at android.app.Activity.performCreate(Activity.java:7136)
This can be fixed by adding the abiFilters setting to build.gradle to explicitly list the ABIs we support. That way, Gradle won't waste time building an x86 libnative-lib.so, and if you attempt to install the APK on an x86 device, it'll fail immediately with a clear error message.
Reported on Discord by нυηтєя.
The current Android support package no longer includes x86 libraries. However, Gradle defaults to building libnative-lib.so for all ABIs, so the APK contains the following:
Because there's at least one x86 library in the APK, it can still be installed on x86 emulators, but it crashes on startup with the following error:
This can be fixed by adding the
abiFilters
setting to build.gradle to explicitly list the ABIs we support. That way, Gradle won't waste time building an x86 libnative-lib.so, and if you attempt to install the APK on an x86 device, it'll fail immediately with a clear error message.Environment: