khoren93 / flutter_zxing

Flutter plugin for scanning and generating QR codes using the ZXing library, supporting Android, iOS, and desktop platforms
https://pub.dev/packages/flutter_zxing
MIT License
89 stars 50 forks source link

Cmake #83

Open Abhinav-Satija opened 1 year ago

Abhinav-Satija commented 1 year ago

Hi I am on the latest CMake version but I am getting an error flutter_zxing-1.0.0/src/zxing/core/CMakeLists.txt:1 (cmake_minimum_required): CMake 3.14 or higher is required. You are running version 3.10.2

sunildpb commented 1 year ago

CMake 3.14 or higher is required. You are running version 3.10.2

Getting the same above issue, please help.

wupengbigMarker commented 10 months ago

CMake Error at /Users/bm/.pub-cache/hosted/pub.flutter-io.cn/flutter_zxing-1.4.1/src/zxing/core/CMakeLists.txt:1 (cmake_minimum_required): CMake 3.15 or higher is required. You are running version 3.10.2.

how did you solve this

wupengbigMarker commented 10 months ago

@sunildpb @Abhinav-Satija did you fix this issue? I'm stuck at this issue

sunildpb commented 10 months ago

@sunildpb @Abhinav-Satija did you fix this issue? I'm stuck at this issue

@wupengbigMarker no, I am not able to fix this issue, let me know if you fixed it.

khoren93 commented 10 months ago

@wupengbigMarker To provide more targeted assistance, it would be helpful to gather additional information about your specific situation. Please provide the following details:

  1. Operating System: What operating system are you using?
  2. Platform Information: Please specify the target platform for which you are building the project. Are you building it for Android, Windows, or another platform?
  3. Check CMake Version in Android Studio Settings: In Android Studio: Go to "Android Studio" > "Settings" > "Languages and Frameworks" > "Android SDK" > "SDK Tools" and confirm that the selected CMake version is 3.14 or higher (as required).
wupengbigMarker commented 10 months ago

@khoren93 I updated cmake by homebrew, cmake was truly updated to 3.27.4. But it didn't work. I followed your steps to update cmake on android studio, it didn't work, either. And my device is Redmi 5 plus and Google pixel 3x xl. iOS device is ok. Here is summary: [✓] Flutter (Channel stable, 3.13.2, on macOS 13.1 22C65 darwin-x64, locale zh-Hans-CN) [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 14.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.1) [✓] VS Code (version 1.81.1)

wupengbigMarker commented 10 months ago

Add cmacke path on local.properties file of Android will fix this issue. Just like this : "cmake.dir=/Users/bm/Library/Android/sdk/cmake/3.22.1". And don't forget to remove old cmake vervison of android sdk tools. @khoren93 @Abhinav-Satija @sunildpb