flutter install安裝app時,出現INSTALL_FAILED_NO_MATCHING_ABIS: INSTALL_FAILED_NO_MATCH錯誤的原因

星小梦發表於2024-11-27

透過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

相關文章