Skip to content

Android: error: cannot find symbol MmkvModule.install #38

Closed
@3DJakob

Description

@3DJakob

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: #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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions