flutter install安装app时,出现INSTALL_FAILED_NO_MATCHING_ABIS: INSTALL_FAILED_NO_MATCH错误的原因

通过USB连接移动机,使用flutter install进行安装apk时,出现上述错误,可能是安装错了包架构。
你可以查一下移动机器的CPU所使用的架构指令集,在选择对应的apk进行安装。

如果出现安装的apk名称找不到时,可进行手动指定apk路径。
我使用的vccode,在此给出vscode对应的任务配置(tasks.json在.vscode目录下边)。

{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "flutter",
			"command": "flutter",
			"args": [
				"build",
				"apk",
				"--split-per-abi"
			],
			"group": "build",
			"problemMatcher": [],
			"label": "flutter: flutter build apk",
			"detail": "构建APK任务"
		},
		{
			"type": "flutter",
			"command": "flutter",
			"args": [
				"install",
				"--use-application-binary=${workspaceFolder}\\build\\app\\outputs\\flutter-apk\\app-arm64-v8a-release.apk",
			],
			"group": "build",
			"problemMatcher": [],
			"label": "flutter: install APK",
			"detail": "安装APK任务"
		}
	]
}

在此附上这个问题的其他位置的讨论:
[INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113] Install failed

posted @ 2024-11-27 17:11  星小梦  阅读(88)  评论(0编辑  收藏  举报