Closed Dabbit-Chan closed 1 month ago
The error is self-explaining:
An old version of CMake is being used that cannot automatically detect compiler attributes. Compiler identification is being bypassed. Some values may be wrong or missing. Update to CMake 3.19 or newer to use CMake's built-in compiler identification.
Normally, cmake is automatically installed by flutter/Android toolchain. But something prevents it from working correctly. The actual cause may vary and I'm not sure what causes the issue on your environment.
So, anyway, could you please do the following things:
flutter clean
Here is my Android Studio version, I don't think it needs an update.
Android Studio Iguana | 2023.2.1
Build #AI-232.10227.8.2321.11479570, built on February 22, 2024
Runtime version: 17.0.9+0--11185874 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4084M
Cores: 16
Non-Bundled Plugins:
Dart (232.10305)
GrepConsole (12.14.211.6693.0)
zielu.gittoolbox (500.2.3+223)
io.flutter (78.4.1)
After using cmake: 3.22.1
and ndk: 26.2.11394342
also enable Windows' Developer mode, I get the following errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':pdfrx:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `C:\Users\David Chan\AppData\Local\Pub\Cache\hosted\pub.dev\pdfrx-1.0.51\android\.cxx\Debug\5n586p4x\arm64-v8a'
C++ build system [build] failed while executing:
@echo off
"C:\\Users\\David Chan\\AppData\\Local\\Android\\sdk\\cmake\\3.22.1\\bin\\ninja.exe" ^
-C ^
"C:\\Users\\David Chan\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\pdfrx-1.0.51\\android\\.cxx\\Debug\\5n586p4x\\arm64-v8a" ^
pdfrx
from C:\Users\David Chan\AppData\Local\Pub\Cache\hosted\pub.dev\pdfrx-1.0.51\android
ninja: error: '../../../../.lib/latest/arm64-v8a/libpdfium.so', needed by 'D:/flutter_project/***/build/pdfrx/intermediates/cxx/Debug/5n586p4x/obj/arm64-v8a/libpdfrx.so', missing and no known rule to make it
I tried it a few more times without changing anything and suddenly it worked...
I tried it a few more times without changing anything and suddenly it worked...
Yes, so I don't know the actual cause... Need reboot or such?
I think a new version of ndk and cmake and enable developer mode will solve the problem. No need for reboot.
It show out
Execution failed for task ':pdfrx:configureCMakeDebug[arm64-v8a]'
and here is the log.