mrousavy / react-native-mmkv

⚡️ The fastest key/value storage for React Native. ~30x faster than AsyncStorage!
https://mrousavy.com
MIT License
5.91k stars 254 forks source link

Not working for me in any new project I create #737

Closed muzammilmalana closed 3 weeks ago

muzammilmalana commented 3 weeks ago

D:\Projects\FxConvo\node_modules\react-native-mmkv\android\src\main\java\com\mrousavy\mmkv\MmkvPlatformContextModule.java:7: error: cannot find symbol public class MmkvPlatformContextModule extends NativeMmkvPlatformContextSpec { ^ symbol: class NativeMmkvPlatformContextSpec D:\Projects\FxConvo\node_modules\react-native-mmkv\android\src\main\java\com\mrousavy\mmkv\MmkvPackage.java:19: error: cannot find symbol if (name.equals(MmkvPlatformContextModule.NAME)) { ^ symbol: variable NAME location: class MmkvPlatformContextModule D:\Projects\FxConvo\node_modules\react-native-mmkv\android\src\main\java\com\mrousavy\mmkv\MmkvPackage.java:20: error: incompatible types: MmkvPlatformContextModule cannot be converted to NativeModule return new MmkvPlatformContextModule(reactContext); ^ D:\Projects\FxConvo\node_modules\react-native-mmkv\android\src\main\java\com\mrousavy\mmkv\MmkvPackage.java:31: error: cannot find symbol MmkvPlatformContextModule.NAME, ^ symbol: variable NAME location: class MmkvPlatformContextModule D:\Projects\FxConvo\node_modules\react-native-mmkv\android\src\main\java\com\mrousavy\mmkv\MmkvPackage.java:33: error: cannot find symbol MmkvPlatformContextModule.NAME, ^ symbol: variable NAME location: class MmkvPlatformContextModule D:\Projects\FxConvo\node_modules\react-native-mmkv\android\src\main\java\com\mrousavy\mmkv\MmkvPackage.java:34: error: cannot find symbol MmkvPlatformContextModule.NAME, ^ symbol: variable NAME location: class MmkvPlatformContextModule D:\Projects\FxConvo\node_modules\react-native-mmkv\android\src\main\java\com\mrousavy\mmkv\MmkvPlatformContextModule.java:15: error: method does not override or implement a method from a supertype @Override ^ D:\Projects\FxConvo\node_modules\react-native-mmkv\android\src\main\java\com\mrousavy\mmkv\MmkvPlatformContextModule.java:21: error: method does not override or implement a method from a supertype @Override ^ Note: D:\Projects\FxConvo\node_modules\react-native-mmkv\android\src\main\java\com\mrousavy\mmkv\MmkvPackage.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 8 errors

FAILURE: Build failed with an exception.

BUILD FAILED in 5s info Run CLI with --verbose flag for more details.

maintenance-hans[bot] commented 3 weeks ago

Guten Tag, Hans here. It looks like you have not provided enough context or steps to reproduce your issue. Please check ze documentation and ensure you have installed ze library correctly in your project. If you continue to have problems, please include your React Native and library versions, along with any build logs from your terminal. If this is a persistent problem, we suggest sponsoring mrousavy to help prioritize your issue: Sponsor mrousavy. Vielen Dank!

Note: If you think I made a mistake by closing this issue, please ping @mrousavy to take a look.

muzammilmalana commented 2 weeks ago

@mrousavy

amutsch commented 2 weeks ago

@muzammilmalana it would help if you could provide some details.

Can you run react native doctor for us What version of RN(assuming 75.x) Are you running with new architecture enabled? What version of MMKV are you running

muzammilmalana commented 2 weeks ago

im running 0.75.2 new architecture disabled ... also tried enabling then running but still failed mmkv 3.0.2 when i install mmkv .. the build fails after running npx react-native run-android i tried installing on another project .. unfortunately same error it used to work before updates but now even if i downgrade and install previous version of mmkv .. no success any kind of help would be appreciated

amutsch commented 2 weeks ago

The 3.x line is completely geared around turbo modules and the new architecture. You should be using 2.12.0 if new architecture is disabled, when switching between v2 and v3 make sure you clear the android build folder or some artifacts may be left in there causing problems. Switch to v2 and if problems let us know what you are seeing