The modern ecosystem Android is dominated by 64-bit architecture, but the need to create 32-bit versions of applications still exists. This may be due to the need to support legacy devices, specific APK size requirements, or working with legacy libraries that have not been ported to new standards. Developers are often faced with a situation where Google Play requires 64-bit assemblies, but internal testing or a corporate distribution must work on an old fleet of hardware.

The process of compiling 32-bit code requires fine tuning of the development environment Android Studio and the assembly file build.gradle. Errors at this stage can lead to the application simply not starting on the target device or crashing with an error INSTALL_FAILED_NO_MATCHING_ABIS. Below we will analyze in detail the technical aspects of the project configuration so that you can flexibly manage processor architectures.

It is worth noting that the transition to a pure 32-bit architecture in 2026 is the exception rather than the rule. However, understanding the principles of working with ABI (Application Binary Interface) is critical for any engineer involved in low-level optimization or support of legacy systems. Correctly setting up filters can significantly reduce the size of the final artifact.

Understanding processor architecture and ABI

Before making changes to the code, it is necessary to clearly distinguish between the concepts of processor architecture and binary application interface. In the world of mobile devices, 32-bit architectures usually mean armeabi-v7a and legacy armeabi. The former is the standard for most 32-bit ARM processors released over the last decade and provides good compatibility.

On the other hand, 64-bit architectures such as arm64-v8a and x86_64require more memory for pointers, but provide better performance in computing tasks. When you build an application "universally" (Fat APK), it includes .so libraries for all supported architectures. This increases the file size, but guarantees that it will run on any device.

To create an exclusively 32-bit application, you need to explicitly tell the builder which native libraries to include in the package. Ignoring this step will cause the build system to default to 64-bit dependencies if they are present in the repositories. This may cause version conflicts or unpredictable runtime behavior.

โš ๏ธ Attention: Removing support for 64-bit architectures from a project may lead to refusal to publish the application in the Google Play Store, since the store requires mandatory presence arm64-v8a for new projects and updates.
๐Ÿ’ก

Use the APK Analyzer utility in Android Studio to visually check which lib folders (armeabi-v7a, arm64-v8a) are present inside your built APK file.

Configuring Gradle to limit architectures

The main tool for managing the build in the environment Android Studio is the module file build.gradle applications. This is where parameters ndk and filters abiFiltersare set. To force the application to be built only for 32-bit systems, you need to edit the block defaultConfig or specific buildType.

You need to add a section ndk, inside which contain a list of allowed architectures. The syntax is as follows:

android {

defaultConfig {

ndk {

abiFilters "armeabi-v7a"

}

}

}

This configuration tells the compiler to ignore all other architectures, even if dependencies imply them. If you are using multiple build options (for example debug and release), make sure that the settings are applied to all the necessary blocks. Otherwise, the debug version may be 32-bit, and the release version may be mixed.

Sometimes a more flexible approach is required when different sets of libraries are used for different versions of the SDK. In such cases, you can use conditional logic inside the Gradle script, checking the version minSdkVersion. However, for a pure 32-bit build, it is enough to strictly set the filter, as shown above.

โ˜‘๏ธ Setting up Gradle

Done: 0 / 5

Working with native libraries and JNI

If your application uses native code via JNI (Java Native Interface), the situation becomes more complicated. You will have to compile C/C++ code specifically for the architecture armeabi-v7a. Standard Android NDK supports cross-compilation, but requires correct configuration of the file CMakeLists.txt or Android.mk.

In the configuration CMake you need to make sure that the variable ANDROID_ABI is set to the correct value. If you rely on pre-built binaries (.so) from third parties, you are responsible for finding 32-bit versions of them. An attempt to run a 64-bit library on a 32-bit process will immediately crash the application.

A common mistake is mixing libraries of different architectures in one folder lib. The assembler may not throw a compilation error, but Android runtime will not be able to load such libraries correctly. Always check the contents of the folders src/main/jniLibs.

โš ๏ธ Attention: Make sure that all dependencies, including advertising SDKs and analytics, are compatible with 32-bit architecture. Some modern SDKs have already abandoned support for armeabi-v7a.

To check the compatibility of native libraries, you can use the utility readelf or objdump from the NDK toolkit. The command will allow you to see the header of the ELF file and determine which machine it was compiled for.

readelf -h libyourlib.so | grep Machine

In the command output you should see ARM for 32-bit libraries. If it says AARCH64, then the library is 64-bit and will not suit your purpose.

Why do some libraries not work?

Native libraries contain machine code specific to the processor instruction set. A 32-bit processor physically cannot execute the instructions of a 64-bit set, so loading such a library is impossible without emulation, which is not provided for system calls in Android.

Reducing the size of an APK through ABI partitioning

One โ€‹โ€‹of the main advantages of collecting the 32-bit version is reducing the size of the installation file. Excluding 64-bit libraries can reduce the APK size by 30-40%, which is critical for regions with slow Internet or devices with low memory. However, Google's modern approach recommends using Android App Bundles (.aab).

When using the format .aab and publishing on Google Play, the store automatically generates and gives the user only those bits of code that his device needs. In this case, you don't need to manually create separate 32-bit APKs if you download a universal bundle. But for local installation or third-party stores, the separation is still relevant.

To create split APKs in Android Studio, you can use the splits in file build.gradle. This will allow you to automatically generate separate files for each architecture when building a release.

android {

splits {

abi {

enable true

reset()

include 'armeabi-v7a'

universalApk false

}

}

}

This approach ensures that a file containing only code for 32-bit processors will appear in the folder outputs/apk/release . This is ideal for intra-enterprise distribution or testing on older hardware.

๐Ÿ’ก

Using Android App Bundle (.aab) is preferable to manually splitting APKs, as Google Play automatically optimizes the download for each user, delivering only the necessary code.

Compatibility issues and emulation

When When running a 32-bit application on modern 64-bit smartphones, a number of nuances may arise. Although Android supports running 32-bit code on 64-bit kernels (via compatibility mode), performance may be lower and memory consumption higher due to context switching overhead.

Some smartphone manufacturers are beginning to abandon support for 32-bit libraries at the kernel level or system drivers in their custom firmware. This means that your application may simply not install on the latest flagships from 2026-2026 if they run in โ€œ64-bit onlyโ€ mode.

The table below shows the main differences in architecture support on different versions of Android:

Android version 32-bit support (armeabi-v7a) 64-bit requirement Status in Play Market
Android 9 and below Full No Available
Android 10-12 Full Recommended Required for new applications
Android 13+ Limited Required Only updates to existing ones
Android 15+ Removed (on some devices) Strictly required Not available for purely 32-bit

It is important to consider that support policies change dynamically. What worked yesterday may no longer function after updating the operating system on the user's device. Always test the application on real devices with different OS versions.

๐Ÿ“Š For what purpose are you building a 32-bit application?
Support for older phones
Reducing APK size
Testing legacy code
Requirement of a corporate customer
Other

Debugging and testing on an emulator

To check the functionality of a 32-bit assembly, it is not necessary to have a fleet of old phones on hand. Android Emulator allows you to create virtual devices with a specific architecture. When creating a new System Image in AVD Manager, select the image labeled ARM or armeabi-v7arather than x86_64.

Running a 32-bit emulator on a 64-bit host (your PC) may be slower due to instruction translation if hardware virtualization is not enabled properly. Make sure that technologies are enabled in your computer's BIOS settings VT-x (for Intel) or SVM (for AMD).

In the logs Logcat when starting the application, pay attention to messages related to loading libraries. Errors like dlopen failed: library "libfoo.so" wasn't found often indicate that the system is trying to load a library from the wrong architecture folder.

โš ๏ธ Attention: The interfaces and operating conditions of emulators may be updated. Check the official Android Studio documentation for the latest system image requirements before setting up a virtual device.

Use the command adb shell getprop ro.product.cpu.abi on a connected device or emulator to instantly see what architecture it emulates. This will help avoid confusion when you think you are testing a 32-bit environment, but are actually working in a 64-bit one.

How to speed up a 32-bit emulator?

In the emulator settings, enable the "Use Host GPU" option and make sure that a system image with Google Play support is selected, since they are usually better optimized to run on modern processors via binary translation.

Is it possible to run a 32-bit application on an Intel x86 processor?

Yes, but for To do this, the APK must include architecture libraries x86 or x86_64. If the app only has armeabi-v7a, the emulator or device with an Intel processor will use the built-in binary code translation (Native Bridge), which can significantly reduce performance.

Why is Google Play rejecting my app?

As of August 2019, all new applications and updates must support 64-bit architecture. If you upload an APK containing only armeabi-v7a, the Developer Console will throw an error. The solution is to download the Android App Bundle (.aab) containing both architectures, or add arm64-v8a to the filters.

How to check the architecture of the installed application?

Connect the device via USB and run the command: adb shell dumpsys package com.your.package.name | grep abi. This will show a list of supported ABIs for a given package on a specific device.

Does a 32-bit build affect security?

Indirectly yes. 64-bit architectures support more advanced memory protection mechanisms (such as improved ASLR and authentication pointers) that are not available or limited in 32-bit mode. This makes 32-bit applications theoretically more vulnerable to certain types of attacks.