#背景
換組啦,去了UC國際瀏覽器,被擁抱變化了。還在熟悉階段,嘗試了下adb,然后就碰到了這個INSTALL_FAILED_NO_MATCHING_ABIS的坑。。。
?
#解決方法
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.
了解大概原理:應用使用了原生庫(NDK,Native Lib),這些庫的編譯目標通常是arm架構的cpu,在x86的模擬器上運行就會報這樣的錯誤。
知道原因了就簡單了,新建一個arm架構的模擬器,蛋疼的是這種模擬器卡的要死,無法工作
?
#后續
這個問題的排查其實很快就找到原因了的,但實際解決還是隔了一天。
第一個是:因為太卡了,沒有耐心等待手機模擬器的打開,adb install命令也沒有耐心等待;
第二個是:在新建arm架構的模擬器的時候,as提示我不建議創建arm架構的,強烈建議使用x86的,最初定位還以為因為系統是64位的而新建的是32位的cpu的問題,導致還是去創建了一個X64的模擬器
?
?
#參考資料
https://stackoverflow.com/questions/24572052/install-failed-no-matching-abis-when-install-apk
https://juejin.im/post/5a30dca7f265da4324807033