记录一下,真机编译的时候没问题,用模拟器的时候报:INSTALL_FAILED_NO_MATCHING_ABIS,查了一下原因。就是因为为了提速用了、x86的模拟,所以。。。
还好stackoverflow有人解决了这些问题:
1、http://stackoverflow.com/questions/24572052/install-failed-no-matching-abis-when-install-apk
2、http://stackoverflow.com/questions/24751350/install-failed-no-matching-abis-how-to-overcome
解决起来还是比较简单的,在app/build.grade的android节点下增加:
XML/HTML代码
- abi {
- enable true
- reset()
- include 'x86', 'armeabi-v7a'
- universalApk true
- }
- }
一切就OK了,再编译的时候就:
XML/HTML代码
- 01/14 09:36:59: Launching app
- $ adb install-multiple -r /xxxxx/app/build/outputs/apk/app-x86-debug.apk /xxxxx/app/build/intermediates/split-apk/debug/slices/slice_5.apk /xxxxx/app/build/intermediates/split-apk/debug/slices/slice_6.apk /xxxxx/app/build/intermediates/split-apk/debug/slices/slice_9.apk /xxxxx/app/build/intermediates/split-apk/debug/slices/slice_2.apk /xxxxx/app/build/intermediates/split-apk/debug/dep/dependencies.apk /xxxxx/app/build/intermediates/split-apk/debug/slices/slice_8.apk /xxxxx/app/build/intermediates/split-apk/debug/slices/slice_7.apk /xxxxx/app/build/intermediates/split-apk/debug/slices/slice_3.apk /xxxxx/app/build/intermediates/split-apk/debug/slices/slice_4.apk /xxxxx/app/build/intermediates/split-apk/debug/slices/slice_0.apk /xxxxx/app/build/intermediates/split-apk/debug/slices/slice_1.apk
- Split APKs installed
- $ adb shell am start -n "com.xxxxx.app/com.xxxxx.app.activity.StartActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
- $ adb shell am startservice com.xxxxxx.app/com.android.tools.fd.runtime.InstantRunService
- Connected to process 3689 on device emulator-5554
居然切成了10个apk.....
版权协议, 要求署名、非商业和保持一致. 本站欢迎任何非商业应用的转载, 但须注明出自"