Android studio simulator architecture choose arm or x86 to solve the problem of missing libraryexception

first of all, if your APP can be installed normally including third-party or self-compiled, then use x86, because the architecture of the virtual machine is very fast; If, like me, the so in the compiled APK is ARM, then an ARM-architecture virtual machine is required, otherwise the following error will be reported. X86 compatibility is not enough, many apps can not be installed or installed to play. Most emulators on the market are x86, so if you can’t install them, consider the reason why they don’t support the x86 architecture. Google official emulator, Intel x86 system mirror, opened KVM acceleration, the result installed several applications failed, such as qq various versions, jingdong client, touch input method, etc. The message is Failure [INSTALL_FAILED_NO_MATCHING_ABIS], presumably because these applications are not compatible with x86 devices. Baidu Takeaway and X-Plore were installed successfully.

after using the simulator to install the application software to run today, an error was found as follows:

MissingLibraryException: lib/x86/libgnustl_shared. So

02-07 02:53:39.122 7607-7639/com.gala.video E/AndroidRuntime: FATAL EXCEPTION: jobmanager-5-12
Process: com.gala.video, PID:>

02-07 02:53:39. 7607
com. Getkeepsafe. Relinker. MissingLibraryException: Lib/x86/libgnustl_shared. So
the at com. Getkeepsafe. Relinker. ApkLibraryInstaller. InstallLibrary (ApkLibraryInstaller. Java: 85)
the at Com. Getkeepsafe. Relinker. ReLinkerInstance. LoadLibraryInternal (ReLinkerInstance. Java: 180)
the at com. Getkeepsafe. Relinker. ReLinkerInstance. LoadLibrary (ReLinkerInstance. Java: 136)
the at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:92)

my emulator is the default Android studio configuration when it was created and is an x86 architecture emulator. Why is the system an emulator of this architecture by default?Before Windows installed virtual machines, we had to turn on the BIOS virtual device switch: HAXM was needed to speed up the AVD emulator on an Intel CPU host.

  • step 1: enter the BIOS to enable VT (Virtualization Technology) option; Step 2: download Intel x86 Emulator Accelerator(HAXM install)

from the SDK Manager of Android studio

after we create an emulator, the default configuration is the x86 architecture, which has the advantage of fast speed. However, it has a big disadvantage of insufficient compatibility, which results in many applications compiled with ARM architecture cannot be installed, or the boot error is reported after installation. The above error means that the emulator you have turned on is x86, so the relevant SO library in your APP is also x86. However, in your packaged APP, only the SO library of ARM was found, so the error was reported. So what we’re going to do is create an ARM architecture virtual machine:

we configure an ARM processor architecture virtual machine as shown in the figure below:

select ARM virtual machine, lower right corner will prompt, this is more than 10 times slower than x86, pro test, may be more than 10 times slower.

of course you can increase the virtual machine memory a little bit:

after the above completion, start our ARM virtual machine, try to install apk can

Read More: