react-native-mmkv: Android: error: cannot find symbol MmkvModule.install
I installed this module and successfully used it on iOS. I then preceded with following the steps for setting up android with reanimated installed copying the code from the example. It could not find the module so I had to add it manually by adding
include ':react-native-mmkv'
project(':react-native-mmkv').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-mmkv/android/')
to settings.gradle
and in build.gradle
adding
implementation project(':react-native-mmkv')
As described here: https://github.com/mrousavy/react-native-mmkv/issues/37
Strangely enough, it had added the code implementation 'com.tencent:mmkv-static:1.0.10'
there from before but with that code it simply cannot load the module.
However when I try to build the project in android studio it fails with:
/Users/jakob/coding/my-app/android/app/src/main/java/com/striveapp/StriveJSIPackage.java:17: error: cannot find symbol
MmkvModule.install(jsContext, reactApplicationContext.getFilesDir().getAbsolutePath() + "/mmkv");
^
symbol: method install(JavaScriptContextHolder,String)
location: class MmkvModule
Am I missing something here? Perhaps the module gets loaded incorrectly and thus cannot run the function? Just a noob with android development here, please tell me if you need some other information.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 15 (6 by maintainers)
Oh jesus christ I just noticed you aren’t on the latest MMKV version, you have to upgrade to 1.1.6!
Hm, that’s weird. Don’t have an answer for this atm, I’ll take a look when I have some free time