ammarahm-ed / react-native-mmkv-storage

An ultra fast (0.0002s read/write), small & encrypted mobile key-value storage framework for React Native written in C++ using JSI
https://rnmmkv.now.sh
MIT License
1.56k stars 109 forks source link

[Android] issues running after installation #322

Closed nohagazzaz closed 1 year ago

nohagazzaz commented 1 year ago

Describe the bug after running npm install react-native-mmkv-storage and npx expo prebuild, i tried running android app by using this command npx expo run:android, i get this error message:


FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':react-native-mmkv-storage:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':react-native-mmkv-storage:debugCompileClasspath'.
   > Could not resolve com.facebook.react:react-android:+.
     Required by:
         project :react-native-mmkv-storage
      > Failed to list versions for com.facebook.react:react-android.
         > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/facebook/react/react-android/maven-metadata.xml.
            > Could not GET 'https://repo.maven.apache.org/maven2/com/facebook/react/react-android/maven-metadata.xml'.
               > repo.maven.apache.org

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1m 8s

To Reproduce Steps to reproduce the behavior:

  1. npm install react-native-mmkv-storage
  2. npx expo prebuild
  3. npx expo run:android

Expected behavior the app should build and start

Platform Information:

elliottkember commented 1 year ago

@ammarahm-ed I think the issue is in https://github.com/ammarahm-ed/react-native-mmkv-storage/commit/7bc07ac7da79cd3aee3e4e1fd1a5d926d4506a72 where this code was removed:

if (isNewArchitectureEnabled()) {
  apply plugin: 'com.facebook.react'
}
DeVoresyah commented 1 year ago

same issue here

DeVoresyah commented 1 year ago

I've solved this issue by upgrading the react native version to 0.71.6

Mookiies commented 1 year ago

Breaking Change Works only on react native 0.71.x and above.

From the release notes for version 0.9.0