Closed dimitar71 closed 2 months ago
1.3.5+ drop x86 and armV7.
1.3.5+ drop x86 and armV7.
That is right. You have two options. Either add armv8 support or build armv7 binary of MMKV by yourself.
Thank you for your quick responses. I am going to do that and will inform here of the success/failure.
Using it in a library module, we are expecting this to work out of the box. It is failing when compiling against a vanilla Chromecast device after all, not some exotic unknown thingie done in a mom-and-pop basement/garage.
Or, to have a short tutorial/steps what needs to be done - with or w/o building from sources and alike. I personally think there should be an extensive section somewhere there - https://github.com/Tencent/MMKV/wiki/android_setup, with screenshots and all.
Other than this recent problem - an excellent, if not best and in its own league, library.
And finally, a suggestion - if possible, to have arm.. .so part of Assets
section of every new release?
It will help a lot!
OK, using the steps in https://github.com/Tencent/MMKV/wiki/android_setup > Build From source
and it fails.
Using Android Studio Koala | 2024.1.1.
Please provide full steps guide if possible, including Android Studio version, Gradle version, Java version, etc. for the ability to compile against your sources.
In the meantime, back to 1.3.4
.
This is using default project:
And this is after upgrading Gradle to 7.5
After some tweaking, I could build from sources using latest Android Studio, Gradle and Kotlin. There are some caveats, up to you to use these findings or not.
Attached is MMKV-1.3.6/Android/MMKV
folder only as a zip, with the changes which allow me to build and use all arm additions.
Android/MMKV
folderAndroid Studio Koala 2024.1.1
with M1 Mac
Settings > Languages & Frameworks > Android SDK
SDK Platforms
Android SDK Platform 34
SDK Tools
NDK (Side by side)
- 27.0.11902837
and 26.2.11394342
CMake
- 3.22.1
File > Sync Project with Gradle Files
Build > Clean Project
Build > Make Project
mmkv/build/outputs
folderbuild.gradle
ext.kotlin_version = '2.0.0'
classpath 'com.android.tools.build:gradle:7.4.2'
- OKclasspath 'com.android.tools.build:gradle:8.5.0'
- fails since BuildConfig is not generatedminSdkVersion = 21
- must be added or failsettings.gradle
include ':mmkv', 'mmkvannotation'
- removed mmkvdemo
since some unit tests failgradle/build_library.gradle
// signingConfig signingConfigs.configDebug
- says key is tamperedgradle/wrapper/gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
mmkv/build.gradle
minSdkVersion rootProject.ext.minSdkVersion
- must be added or failabiFilters 'armeabi-v7a', 'arm64-v8a', 'arm64-v8a', 'x86_64'
- uncomment this linemmkvannotation/build.gradle
minSdkVersion rootProject.ext.minSdkVersion
- must be added or failbuild.gradle
files updated - please compare with originalSettings > Build, Execution, Deployment > Build Tools > Gradle > Gradke JDK
jbr-27 JetBrains Runtime 17.0.10 /Applications/Android Studio.app/Contents/jbr/Contents/Home
The removal of 32bit architecture is a well thought decision and will not be reversed.
Upon your changes, the changes to the abi filter is essential. Others are just environmental differences.
I shall mention the steps to build a armv7 binary in the wiki if I haven't already done so.
v1.3.7 LTS has just been release.
This Long Term Support (LTS) release primarily reintroduces support for the ARMv7 architecture and lowers the minimum SDK version requirement to 21. Please note that only critical bug fixes will be applied to the 1.3.x series.
New features will be introduced in version 2.0 and later, which will discontinue support for 32-bit architectures and raise the minimum SDK version requirement to 23.
One more thing, the wiki has been updated on building from source on Android. It will be helpful once we upgrade to v2.0+. https://github.com/Tencent/MMKV/wiki/android_setup
Thank you!
Note:
An crash issue will be ignored & closed in a week without logs.
The language of MMKV
Kotlin
The version of MMKV
1.3.5 and 1.3.6
The platform of MMKV
Android
The installation of MMKV
Gradle/Maven
What's the issue?
With
1.3.5
and1.3.6
I am gettingjava.lang.UnsatisfiedLinkError: dlopen failed: library "libmmkv.so" not found
We are using with multi process mode, here is the line where it fails:
Note that there are no such issues when using
1.3.4
.What's the log of MMKV when that happened?
Here is the exception we are getting, happens when app starts