Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

32-bit for MMKV version 2.x. Google will require switching to 16KB in 2025 #1503

Open
menscikov opened this issue Mar 4, 2025 · 10 comments
Open

Comments

@menscikov
Copy link

Hello,

I know similar questions have been asked before. But I wanted to know about something else.

According to the information that Google officially provided, in 2025 they are going to prohibit the publication of applications in the Google Play Store that do not support 16KB.

In this case, everyone will have to switch to MMKV version 2.x.
But, there are still a huge number of devices, even on Android 14, that run on a 32-bit system.

It turns out that developers are becoming hostages of this situation. If we switch to MMKV version 2.x to support 16KB due to the requirements of the Google Play Store, then a huge number of 32-bit devices will simply stop running. That is, the application will be installed from the Google Play Store and on 32-bit devices it will simply crash.

Because of this, everyone who uses the MMKV library and publishes their applications in the Google Play Store, and I am sure there are a huge number of them, because your library is the best, will be forced to look for alternatives, which in principle do not exist.

Please tell me, is it possible to somehow use 2 versions of your libraries in 1 application (MMKV 1.x and MMKV 2.x) to support all devices?

@lingol
Copy link
Collaborator

lingol commented Mar 4, 2025

No I don't think it's possible to have two versions of a lib in the same App. Even if it's possible, the 1.3.x one still lacks 16K support.

@menscikov
Copy link
Author

No I don't think it's possible to have two versions of a lib in the same App. Even if it's possible, the 1.3.x one still lacks 16K support.

Thank you for fast reply.

Then we have only 1 option left, is to switch to another library?
Otherwise, all developers simply won't be able to publish the application in Google Play Store, as soon as Google obliges us to support 16KB.

This is very sad, because a lot of things will need to be redone in the application.

@lingol
Copy link
Collaborator

lingol commented Mar 4, 2025

How ever, you can upgrade your App to armv8 only starting from your next big release. In this case users on armv7 won't see the update and won't upgrade to it.

Steps suggested by DeepSeek.

To ensure your app is only available for ARMv8 (ARM64) devices on the Google Play Store, follow these steps:

1. Include Native Code for ARM64 Only

  • Place your native libraries (e.g., .so files) in the src/main/jniLibs/arm64-v8a directory. If your app doesn’t have native code, add a minimal dummy library to enforce ABI filtering.

2. Configure build.gradle

  • Specify abiFilters in your app's build.gradle to exclude other architectures:
    android {
        defaultConfig {
            ndk {
                abiFilters 'arm64-v8a' // Only include ARM64 libraries
            }
        }
    }

3. Use Android App Bundles (Recommended)

  • Upload your app as an Android App Bundle (.aab). The Play Store will generate APKs per ABI, ensuring only ARM64 devices receive the compatible version.

4. Verify No Other ABIs Are Included

  • Ensure no other ABI directories (e.g., armeabi-v7a, x86) exist in your project, and check that dependencies don’t include multi-ABI libraries.

Result:

  • ARM64 Devices: Will see/install the app.
  • Non-ARM64 Devices (ARMv7, x86): Will be filtered out by the Play Store and cannot install the app.

Notes:

  • Native Code Requirement: The app must include at least one native library (even a dummy one) to trigger ABI-based filtering.
  • No Fallback: Without native code, the app is compatible with all devices regardless of ABI.

By following these steps, you ensure that only ARMv8-compatible devices can install your app, avoiding installation on incompatible devices.

@menscikov
Copy link
Author

menscikov commented Mar 4, 2025

Unfortunately i can't exclude 32-bit devices, at least for now. :(

Unfortunately around 50% of Android TV-boxes still use 32-bit.
In our case, that's more than 100,000 users.

@lingol
Copy link
Collaborator

lingol commented Mar 4, 2025

Well MMKV is open-sourced. You can always fallback to hacking it to fulfill your needs.

@menscikov
Copy link
Author

Well MMKV is open-sourced. You can always fallback to hacking it to fulfill your needs.

Thank you.

@menscikov
Copy link
Author

menscikov commented Mar 4, 2025

@lingol I tried to build MMKV from source, but there is no such task publishToMavenLocal.
I entered this task manually in gradle and task failed, it's trying to publish to MavenCentral.

@lingol
Copy link
Collaborator

lingol commented Mar 4, 2025

Read the wiki carefully. There's a difference between v2.1.0 and older versions on gradle tasks.

@JinJieGu
Copy link

Is there any official plan to support this, there should be a lot of people who will encounter this problem.

@lingol
Copy link
Collaborator

lingol commented Mar 15, 2025

Thank you for raising this concern. We acknowledge that Google's current guidelines on this matter are still evolving and lack definitive clarity. As such, we’ve decided to adopt a cautious approach while monitoring updates to ensure alignment with finalized recommendations.

For our Long-Term Support (LTS) series, our policy prioritizes stability and maintenance over feature additions. New functionality will only be considered in exceptional cases where there are critical requirements (e.g., security vulnerabilities, breaking changes, or unavoidable compatibility issues).

We’ll continue to evaluate the situation closely and reassess our stance once official guidance is solidified. In the meantime, we appreciate your patience and understanding as we prioritize reliability for LTS users.

Next Steps:

  • Track Google’s guideline updates and share key insights with the community.
  • Revisit this discussion once official recommendations are published.

Feel free to share additional context or use cases that might influence our approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants