Search Issue Tracker
Fixed in 2021.2.X
Fixed in 2020.3.X, 2021.1.X
[Android] App installed using APK from app bundle option in Android Studio fails to run
How to reproduce:
1. Create and open a new project
2. Open Build Settings and switch to the Android platform
3. Add Open Scenes to build
4. Check the "Export Project" checkbox
5. Click Export and select directory to export project to
6. Open the exported project using Android Studio
7. Click Build > Build Bundles(s) / APK(s) > Build Bundle(s)
8. Open Run > Edit Configurations... > launcher > General > Installation Options
9. Set "Deploy" to "APK from app bundle"
10. Click Run -> Run 'launcher'
Expected Behavior: app launches in the connected device
Actual Behavior: error message appears: "The full error message: Failure to initialize! Your hardware does not support this application. Failed to load 'libmain.so' java.lang.UnsatisfiedLinkError: dlopen failed: library "/data/app/com.DefaultCompany.bugexportproject-9BuOMuJaMXjG4oK6dLN3SQ==/lib/arm/libmain.so" not found Press Ok to quit."
Reproducible with: 2020.2.0a12, 2020.2.7f1, 2021.1.0b11, 2021.2.0a8
Not reproducible with: 2018.4.32f, 2019.4.21f1, 2020.2.0a11
VLNQA00335, Samsung Galaxy S20+ 5G (SM-G986B), Android 10, CPU: Exynos 990, GPU: Mali-G77
Pixel4a (customer information)
Not reproducible devices:
VLNQA00286, Meizu - (PRO 5), Android 7.0, CPU: Exynos 7 Octa 7420, GPU: Mali-T760
VLNQA00313, Huawei Y6 Ⅱ Compact (HUAWEI LYO-L01), Android 5.1, CPU: MediaTek MT6735, GPU: Mali-T720
Jul 03, 2021 02:47
Same error on Unity 2020.3.12f1c1 LTS.
Adding android:extractNativeLibs="true" to the element in AndroidManifest.xm
Adding android.bundle.enableUncompressedNativeLibs=false to gradle properties
won't walk around
May 21, 2021 15:16
Still having this problem in Unity 2020.3.2f1, I'm using the Play Asset Delivery and its plugin to generate the build, which can be seen at "developer.android.com" (not a verified link apparently)
Apr 16, 2021 07:21
I don't think using a custom gradle property template would work
Apr 14, 2021 18:54
it is mentioned the the bug/error is fixed in unity 2021.1.2f1 I'm facing the exact same issue in this exact version !
Mar 30, 2021 15:18
Apologies, didnt realize my link wouldnt work. These are the lines I commented to work around the issue:
// Android Resolver Exclusions Start
/*exclude ('/lib/arm64-v8a/*' + '*')
exclude ('/lib/armeabi/*' + '*')
exclude ('/lib/mips/*' + '*')
exclude ('/lib/mips64/*' + '*')
exclude ('/lib/x86/*' + '*')
exclude ('/lib/x86_64/*' + '*')*/
Mar 30, 2021 15:16
This is also happening on Unity 2019.4.17f1
Workaround is commenting out the following exclusions on the mainTemplate.gradle file:
These exclusions uncomment themselves after building, but it works.
Mar 23, 2021 15:43
Currently we can't upvote this because it is marked as "fixed", but I'm clearly experiencing this in 2020.3.0f1.
Mar 22, 2021 17:19
Build APK instead of App Bundle.
Mar 15, 2021 10:34
Repeating what I said here (https://forum.unity.com/threads/app-not-working-on-some-devices-failed-to-load-libmain-so.1031137/?gq=libmain.so), in case it's useful for some people:
This is still an issue with 2020.3.0f1 (also the gradle.properties workaround is not working in my Flutter project either).
Actually adding android:extractNativeLibs="true" to the element in AndroidManifest.xml as a temporary workaround does work with 2020.3.0f1. This might be specific to my version of Gradle (per | Android Developers, this is set to false by default in Android Gradle plugin 3.6.0).
This isn't a long-term solution as Unity should be able to handle loading native libraries without extracting to the filesystem first.
I also confirm this is still present in 2021.1.0b11
Mar 11, 2021 21:52
@NIK_D I've added that, resubmitted a build and had the same issue occur. Have you tested that with a live build in the Play Store and had success?
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Sprite Preview is broken when the Sprite is too tall or too wide
- Objects are invisible in Scene view when using Wireframe Shading Mode
- The property of a component becomes read-only when it is bound to "PropertyStreamHandle"
- Physics.Raycast does not work when used on the whole model
- Shader Graph changes the Position of Prefab instances in Play mode
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a11
Resolution Note (fix version 2021.1):
Fixed in 2021.1.2f1
Resolution Note (fix version 2020.3):
Fixed in: 2020.3.3f1