-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
Android: error: cannot find symbol MmkvModule.install #38
Comments
Sorry I don't quite get the part with Does Android Studio underline the |
Hey! The 1.0.10 was in the file from the beginning so I replaced it with that other line. I guess it got there when it was trying to auto-link the dependency? Yes android studio studio says "cannot resolve method 'install' in 'MmkvModule' However, maybe the problem is before that. On this line The problem seems to be loading the Reanimated module 🤔 I have tried running Thank you for your time! |
Could you share your versions? Reanimated, React Native, MMKV please |
Sure! Running android studio in rosetta on an M1 Mac could be related. |
Hm, that's weird. Don't have an answer for this atm, I'll take a look when I have some free time |
You could try to Cmd+Click the MmkvModule to find out if it actually exists as a class. Also try cleaning & rebuilding gradle |
Weird indeed. Cmd+Clicking it takes me to the class. Tried cleaning and rebuilding without any luck. |
Yes it is the correct location - can you send a screenshot from android studio of the entire JSI package file you created? |
I think I solved it! I made a new scratch project to try this in. At first, I had to do steps described in #37. Then I got error finding symbol JSIModulePackage. I then imported it like this in the mainApplication.java:
That snippet is from the reanimated docks https://docs.swmansion.com/react-native-reanimated/docs/installation/. And then voila it compiled! Haven't actually tried using the module yet but seems promising. It looks however like I already tried that in the main repository that has reanimated already but I will do some troubleshooting over there to see if I can get it working there as well. |
This does not seem to be the issue in the main repository that uses the reanimated module, unfortunately. |
Oh jesus christ I just noticed you aren't on the latest MMKV version, you have to upgrade to 1.1.6! |
Haha, I changed to the latest and it solved that problem! However, I'm getting other problems and I just cannot seem to get it to launch without crashing. However, since the problem described in this thread is resolved I will close this now. Thank you so much for your time and effort. Let's hope the android setup will be easier in the future! |
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
to
settings.gradle
and inbuild.gradle
addingAs 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:
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.
The text was updated successfully, but these errors were encountered: