21:25 Emulator: Incompatible HAX module version 3,requires minimum version 4
21:25 Emulator: No accelerator found.
21:25 Emulator: failed to initialize HAX: Invalid argument
- 解决方案:
从SDK Manager中下载Intel Emulator Accelerator(HAXM installer),并确认在BIOS setting中Intel TV-x 是enable的。
21:38 Gradle build finished in 3 s 260 ms
21:38 Failed to commit install session 1327754543 with command pm install-commit 1327754543. Error: INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113
21:38 Session 'app': Installation did not succeed. The application could not be installed: INSTALL_FAILED_NO_MATCHING_ABIS Retry
21:41 Emulator: Process finished with exit code 0
- 解决方案:
在 app 的 moudle 的 build.gradle 文件中, 粘贴一下代码, 注意是添加在 android {} 大括号中。
// 解决 native libraries 不支持cpu的体系结构。允许模拟器调试
splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a','x86_64'
universalApk true
}
}
这样就可以直接跑模拟器了. 但这样做后在打包时会产生多个 apk, 所以发布版本时把上面的代码注释掉后 rebuild 一下工程再打包. 切记一定要 rebuild 工程