3

Could you guys please help me with the problems I currently have? I'm trying to follow the steps of how to release apk android from: https://flutter.dev/docs/deployment/android, The program which I tried to release is only the NewFlutterApplication which created from template of Flutter

The problem is: Have been followed all the steps, still I can't run the release apk which i build from flutter

The Error which I got:

Error: ADB exited with exit code 1
Performing Streamed Install

adb: failed to install E:\FlutterProject\flutter_app_1\build\app\outputs\apk\app.apk: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
Install failed

The things that I have tried:

Tried using flutter run -v it don't give any error and run smoothly and the debug it's still run smoothly, only the release APK is the problem which can't be run

JEFF
  • 247
  • 1
  • 14

2 Answers2

2

INSTALL_FAILED_NO_MATCHING_ABIS is when you are trying to install an app that has native libraries and it doesn't have a native library for your cpu architecture. For example if you compiled an app for armv7 and are trying to install it on an emulator that uses the Intel architecture instead it will not work.

Murat Aslan
  • 1,446
  • 9
  • 21
2

UPD: This answer is outdated, Flutter now supports x86/x64

You can't run release build on emulator, because currently flutter doesn't support x86 release binaries

See this issue, and put thumb up reaction on it to increase priority: https://github.com/flutter/flutter/issues/9253

This issue also affects devices that use Intel Atom and some Chromebooks, but don't worry, they will be excluded from supported devices by Google Play automatically

Dmytro Rostopira
  • 10,588
  • 4
  • 64
  • 86
  • so how to test the release apps? is it possible to run in the real device? but when I tried in real device it's directly give me crash apps – JEFF Jun 24 '19 at 09:49
  • @JEFF I'm building two separate apk for amr and arm64, use `--target-platform=android-arm` and test it on real device – Dmytro Rostopira Jun 24 '19 at 10:26
  • is it needed to put anything in the `defaultConfig` in the **build.gradle**? for example `ndk { abiFilters 'armeabi-v7a', 'armeabi' //'x86', }` – JEFF Jun 24 '19 at 10:30
  • @JEFF depends, if you put it, it won't hurt anyway – Dmytro Rostopira Jun 24 '19 at 10:31
  • is it possible to link the Run tab to the device itself? i cant figure out the prob in my case, the screen is blank in release mode but works fine in debug mode. – chitgoks Apr 09 '20 at 03:43
  • @chitgoks x86 is now officially supported and your case might be a flutter issue, report it – Dmytro Rostopira Apr 09 '20 at 08:08
  • @DimaRostopira my isos are x86 but there does not seem to be any option in android studio that can deploy the app to emulator as release. my problem is a data issue though, i got to solve it. – chitgoks Apr 09 '20 at 09:10