Code Monkey home page Code Monkey logo

Comments (18)

ammarahm-ed avatar ammarahm-ed commented on May 12, 2024

Can you check what cmake version you have in android studio? @ravi-poonia

from react-native-mmkv-storage.

haroldwaste avatar haroldwaste commented on May 12, 2024

Same hrere, using cmake v 3.18.0 which I think is the latest version, probably need to downgrade it.

from react-native-mmkv-storage.

ammarahm-ed avatar ammarahm-ed commented on May 12, 2024

Can you @haroldwaste try to go to /node_modules/react-native-mmkv-storage/android/build.gradle and remove the version:'3.10.2' from cmake and see if it builds for you?

from react-native-mmkv-storage.

alessandro-bottamedi avatar alessandro-bottamedi commented on May 12, 2024

Same here, i can confirm that changing the version of cmake in /node_modules/react-native-mmkv-storage/android/build.gradle to version:'3.17.3' (the version I currently have installed) works without any problems.

from react-native-mmkv-storage.

ammarahm-ed avatar ammarahm-ed commented on May 12, 2024

@alessandro-bottamedi does it work if you completely remove it?

..
I put a fixed version because I had 2 versions of cmake installed and it was defaulting to the old 3.6 version for me. Try removing version completely and build again

from react-native-mmkv-storage.

alessandro-bottamedi avatar alessandro-bottamedi commented on May 12, 2024

@ammarahm-ed Without the version line:

  externalNativeBuild {
      cmake {
          path "./src/main/rnmmkv/CMakeLists.txt"
      }
  } 

I get this error, I don't know where it gets that old version of cmake (i'm running 3.17.3):

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
    CMake 3.9.0 or higher is required.  You are running version 3.6.0-rc2

from react-native-mmkv-storage.

ammarahm-ed avatar ammarahm-ed commented on May 12, 2024

Try defining the cmake version in app/build.gradle file

While keeping it removed from the library and see if that works.

Actually android studio keeps 2 versions of cmake. One is 3.6 and other is 3.10.2 or higher by default. It says it defaults to 3.10.2 but it seems that's not the case here.

You can open Android Studio > SDK Manager > and see what cmake versions you have installed and maybe disable the old version. But first try the initial solution.

externalNativeBuild  {
cmake {
 version:"your cmake version" 
} 
} 

@alessandro-bottamedi

from react-native-mmkv-storage.

alessandro-bottamedi avatar alessandro-bottamedi commented on May 12, 2024

Try defining the cmake version in app/build.gradle file

While keeping it removed from the library and see if that works.

Actually android studio keeps 2 versions of cmake. One is 3.6 and other is 3.10.2 or higher by default. It says it defaults to 3.10.2 but it seems that's not the case here.

You can open Android Studio > SDK Manager > and see what cmake versions you have installed and maybe disable the old version. But first try the initial solution.

externalNativeBuild  {
cmake {
 version:"your cmake version" 
} 
} 

@alessandro-bottamedi

Same error with both solution...

I've added this to my app/build.gradle:

    externalNativeBuild  {
      cmake {
        version "3.17.3"
      } 
    } 

I then checked the SDK manager and the old version 3.6 was installed. I updated to 3.10 from the SDK manager but still got the same error:

  CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
    CMake 3.9.0 or higher is required.  You are running version 3.6.0-rc2

PS. i'm on MacOs 10.15.7

from react-native-mmkv-storage.

ammarahm-ed avatar ammarahm-ed commented on May 12, 2024

What is your version of Android Studio?

from react-native-mmkv-storage.

alessandro-bottamedi avatar alessandro-bottamedi commented on May 12, 2024

@ammarahm-ed Android Studio 4.0.1

from react-native-mmkv-storage.

ammarahm-ed avatar ammarahm-ed commented on May 12, 2024

Maybe for now simply install cmake 3.10.2 in Android Studio SDK Manager and the problem will go away. I will look into a proper solution tomorrow.

from react-native-mmkv-storage.

haroldwaste avatar haroldwaste commented on May 12, 2024

@ammarahm-ed on my side, I can confirm that without version:'3.10.2 in build gradle', the build works for both v 3.18.1 and v3.10.2

image

from react-native-mmkv-storage.

ammarahm-ed avatar ammarahm-ed commented on May 12, 2024

@haroldwaste what's the version of Android Studio and NDK you are using. How many cmake versions do you have installed

from react-native-mmkv-storage.

ammarahm-ed avatar ammarahm-ed commented on May 12, 2024

Do you have cmake 3.6 installed too or no?

from react-native-mmkv-storage.

haroldwaste avatar haroldwaste commented on May 12, 2024

NDK version: 22.0.7026061
android studio version: 4.1.2

from react-native-mmkv-storage.

haroldwaste avatar haroldwaste commented on May 12, 2024

nope, 3.6 is not installed, I have both 3.10 and 3.18

from react-native-mmkv-storage.

ammarahm-ed avatar ammarahm-ed commented on May 12, 2024

Seems like updating and removing cmake 3.6 will solve this problem

from react-native-mmkv-storage.

ammarahm-ed avatar ammarahm-ed commented on May 12, 2024

Fixed on master.

from react-native-mmkv-storage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.