-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flutter app crashes on start on Android: couldn't find "libflutter.so" #32756
Comments
Can someone take a look into this? Generated release apk is still crashing. |
i am facing the same here
|
this helped me resolving the issue In build.gradle of app this lines should be added:
|
That fixes the issue because it only generates a 32bit version of the APK, but there should be a 64bit option too |
Fixed in latest master release (flutter: ^1.7.4-pre.71) |
should we be on stable channel or master? |
Master is less reliable and things can break but has more features that eventually will arrive to stable channel |
Still happening on 1.19.0-4.1.pre:
Edit: Seems like uninstalling the app and reinstalling fixed it, error occured without changing anything in the code, just opened up Android studio again and pressed the run button |
Yesterday I submitted an app to test track. I am getting
Per |
This is still happening in flutter v1.20.1 PLEASE SOMEONE FIX THIS ISSUE I'M ABOUT TO GET SUED!!!! `[√] Flutter (Channel stable, 1.20.1, on Microsoft Windows [Version 10.0.18362.959], locale en-US) [√] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [!] Android Studio (version 3.5) [!] IntelliJ IDEA Community Edition (version 2019.2) [√] VS Code (version 1.47.3) [√] VS Code, 64-bit edition (version 1.33.0) [√] Connected device (1 available) here's the error from android studio:
And here's a list of all my plugins: cupertino_icons: ^0.1.3 |
I don't understand how and why was this even closed. Can someone chime on this ongoing issue? |
Any update?? this is a serious problem that needs to be solved |
I don't know if it works for others as well or not but for me it works. The only trick for me was to disconnect all Android devices before creating the APK. By doing so, it adds When I created the APK without connecting the laptop to an Android device the final APK was 15Mb bigger than the previous one and it worked on both S20 and A11 successfully. I hope it helps. |
Flutter clean + Uninstall resolved the issue. But tell me I do not have to do it every single time... |
I just got a report from Crashlytics today about this same error faced by a new user of my app.
|
Why this issue closed? Lots of crash happening for this issue . |
I have the same error. I have Flutter 1.20.3 stable from channel, and before build apk, I was cleaned the project and unattached all (the only one emulator...) devices! |
I'm still receiving these errors in Crashlytics. [√] Flutter (Channel stable, 1.20.3, on Microsoft Windows [Version 6.1.7601], locale en-US) |
I'll reopen the issue since it has started to happen again, I'm seeing a few reports in Crashlytics |
I am facing these crashes as well. |
我也在面临同样的问题 |
flutter after 2 years not able to solve this issue :(
…On Tue, Feb 16, 2021 at 1:08 PM knaeckeKami ***@***.***> wrote:
GCE x86 phone is an automated bot testing your app when you upload it to
play store. it crashes because its using the x86 architecture which is not
supported by flutter. setting the abiFilters as described by #32756
(comment)
<#32756 (comment)>
should fix it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#32756 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALJEI6R577GHWNSUNCH5NGDS7JG2FANCNFSM4HNCRGXA>
.
|
Just faced the same issue. We're using flutter in existing android app and build.gradle...
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId '...'
minSdkVersion 21
targetSdkVersion 29
versionCode 33
versionName "1.0.1"
multiDexEnabled true
}
lintOptions {
checkReleaseBuilds false
}
buildTypes {
release {
signingConfig signingConfigs.release
manifestPlaceholders = [crashlytics: "true"]
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
signingConfig signingConfigs.release
applicationIdSuffix ".debug"
ext.alwaysUpdateBuildId = false
FirebasePerformance {
instrumentationEnabled false
}
crunchPngs false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
if (project.hasProperty('devBuild')) {
splits.abi.enable = false
splits.density.enable = false
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
buildFeatures {
viewBinding true
dataBinding true
}
}
... pubspec.yamlname: flutter_module
description: ...
version: 1.0.0+1
environment:
sdk: ">=2.10.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_bloc: ^6.1.1
super_enum: ^0.5.0
chopper: ^3.0.6
json_annotation: ^3.1.1
shared_preferences: ^0.5.12+4
freezed_annotation: ^0.12.0
rxdart: ^0.25.0
intl: ^0.16.1
cupertino_icons: ^1.0.0
dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^1.10.11
super_enum_generator: ^0.6.0
chopper_generator: ^3.0.6
json_serializable: ^3.5.1
freezed: ^0.12.7
flutter:
uses-material-design: true
fonts:
- family: SanFrancisco
fonts:
- asset: fonts/sfui_regular.ttf
- asset: fonts/sfui_regular_italic.ttf
- asset: fonts/sfui_semibold.ttf
- asset: fonts/sfui_medium.ttf
- asset: fonts/sfui_heavy.ttf
- family: FlutterIcon
fonts:
- asset: images/ttf/FlutterIcon.ttf
module:
androidX: true
androidPackage: ...
iosBundleIdentifier: ... |
Hasn't for me. But, I'll try again and get back to you |
I am facing same issue on Google Pixel 3xl and motorola one vision. I have build my app using this command- If Google tech won't work on Google device, then how to deal with it ? (Please have a look) @eseidelGoogle @chinmaygarde @zanderso @TahaTesser If the error is so common, then it should be mentioned into the release doc or by-default fix should be added. Thanks in advance for the response. Here are the images of the crashes Another- Note- I did read some similar issues, that suggest of adding few lines in abifilter, but I didn't have those device and mine laptop is that powerful to test the app on emulator. |
Same issue |
The abiFilters solution didn't fix it for me |
I am getting the below crashes on Galaxy A21s device. using Flutter version 1.22.2. I don't think the A21 is using x86 architecture, so setting the abiFilters probably won't help. Any ideas on what I can do to fix the issue? Thank you. Where does /lib/arm64, /system/lib64 (from the crash log) refer to? I checked the apk and libflutter.so is found in armeabi-v7a (ARM 32-bit), arm64-v8a (ARM 64-bit), and x86-64 (x86 64-bit) folders.
|
@karmelcorn what abiFilters did you define, please mention ? |
I did not put any abiFilters. I am just building it with flutter build app bundle. My understanding is that filter is necessary for the app to work on x86 architecture. But I am not concerned with the app crashing on GCE x86 phone (automated bot). I am not understanding why the app is crashing on the Galaxy A21s device, which should be running 64 bits. Unless I am wrong here and greatly appreciate anyone to correct me. Thank you. |
I have seen phones that are |
Application was working on my phone but not on client phone. I add mention line in gradle but still application is crashing on client side. It's now more than a week, still not fixed. Can it be resolved if i move to previous flutter sdk? |
Figure out what you are building locally and what your are actually deploying (APK vs AppBundle). Then inspect the folders shown above and then download all the different APKs from the Google Play Console and inspect them. There has to be a miss-match somewhere. |
@karmelcorn That is actually not the Flutter app failing to start but the |
Thank you. I rechecked my logs and I did get a Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo error before the firebasemessage error. I am starting to wonder if this log is from Google Play store doing the test during the review process? Maybe they are side-loading the app or something? |
In my case I solved it by typing 'flutter upgrade' in the command line. |
Same issue HERE !!! |
It's going to be a year with this issue. how we can really fix this? |
There seem to be a few different issues conflated in this thread. However as @TahaTesser points out, these are likely duplicates of one or more existing issues. (Search closed issues for "UnsatisfiedLinkError".) Please also note that this error may be unrelated to Flutter. See the stackoverflow thread here, and the comment here. Since this thread has become long and difficult to follow, and because it is likely a duplicate of other issues, I am going to close it. If you have read the links above, and still think you are seeing a problem not covered there, please file a new issue with a reproducible test case. Thanks! |
Why is this closed? Same issue here. |
Fix when seeing crash on emulatorI had this issue on my emulator when trying to runn a release build through the playstore. My emulator is running android {
//...
defaultConfig {
//...
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
}
}
//...
} This should fix the problem. You simply have to rerun the Hope I could help someone :) |
Really strange, I checked the crash version apk, but I found there was a libflutter.so. We build defferent apk, for one is armv7, the other one is armv8. So, I donot think my crash have relationship with |
Faced exactly same issue when generating release build. But, as mentioned here and as I've experienced, this issue is related to abi filers because I'm using split configuration to generate multiple APKs and none of the split APK works, except of course, the universal build containing all.
By using the above code, only the universal build works, and others give Flutter initialization failed error with libflutter.so not found. |
@Fauzdar1 Check out this: https://flutter.dev/docs/deployment/android#what-are-the-supported-target-architectures
|
Facing the same issue here too, this needs to be seriously investigated. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
Build an APK or bundle on latest master commit, install on any device and the app will crash before it starts. Running debug version doesn't crash, and running via
flutter run --release
doesn't crash either.Logs
flutter doctor --verbose
The critical error log is this:
The text was updated successfully, but these errors were encountered: