When developing a Flutter application, I faced a weird bug. The app could run on debug mode and even when I used the command line: flutter run --release, the app worked fine. But when I tried compiling it by flutter build apk (flutter build ios) then flutter install, the crashed immediately when starting.
Finally, I discovered it was because the device was running 64-bit version of flutter/dart vm, while my app was targeting 32-bit version. I fixed by adding:
To /app/build.gradle
Finally, I discovered it was because the device was running 64-bit version of flutter/dart vm, while my app was targeting 32-bit version. I fixed by adding:
defaultConfig {
...
ndk {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'armeabi-v8a', 'armeabi'
}
}
To /app/build.gradle
Nhận xét
Đăng nhận xét