skip to Main Content

I was trying to build my Flutter app. But it is showing this.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':pdfrx:configureCMakeRelWithDebInfo[arm64-v8a]'.
> [CXX1405] error when building with cmake using C:UsersMiraj HossainAppDataLocalPubCachehostedpub.devpdfrx-0.4.8androidCMakeLists.txt: Build command failed.
  Error while executing process C:UsersMiraj HossainAppDataLocalAndroidsdkcmake3.18.1bincmake.exe with arguments {-HC:UsersMiraj HossainAppDataLocalPubCachehostedpub.devpdfrx-0.4.8android -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=19 -DANDROID_PLATFORM=android-19 -DANDROID_ABI=arm64-v8a -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DANDROID_NDK=C:UsersMiraj HossainAppDataLocalAndroidsdkndk21.4.7075529 -DCMAKE_ANDROID_NDK=C:UsersMiraj HossainAppDataLocalAndroidsdkndk21.4.7075529 -DCMAKE_TOOLCHAIN_FILE=C:UsersMiraj HossainAppDataLocalAndroidsdkndk21.4.7075529buildcmakeandroid.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:UsersMiraj HossainAppDataLocalAndroidsdkcmake3.18.1binninja.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:Flutter_Projectshospital_booking_systembuildpdfrxintermediatescxxRelWithDebInfoi4455492objarm64-v8a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=E:Flutter_Projectshospital_booking_systembuildpdfrxintermediatescxxRelWithDebInfoi4455492objarm64-v8a -DCMAKE_BUILD_TYPE=RelWithDebInfo -BC:UsersMiraj HossainAppDataLocalPubCachehostedpub.devpdfrx-0.4.8android.cxxRelWithDebInfoi4455492arm64-v8a -GNinja}
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/Users/Miraj Hossain/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/Miraj Hossain/AppData/Local/Pub/Cache/hosted/pub.dev/pdfrx-0.4.8/android/.cxx/RelWithDebInfo/i4455492/arm64-v8a/CMakeFiles/CMakeOutput.log". 

  CMake Error at CMakeLists.txt:62 (file):
    file Failed to create link 'C:/Users/Miraj
    Hossain/AppData/Local/Pub/Cache/hosted/pub.dev/pdfrx-0.4.8/android/.lib/latest'
    because existing path cannot be removed: No error



  CMake Warning (dev) at CMakeLists.txt:66 (set):
    Cannot set "pdfrx_bundled_libraries": current scope has no parent.
  This warning is for project developers.  Use -Wno-dev to suppress it.



* 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

2

Answers


  1. Chosen as BEST ANSWER

    I Have Posted a issue in pdfrx package and the owner replied with a solution and it fixed the error

    enter image description here


  2. this error in a Flutter project typically occurs during the build process involving CMake, especially when dealing with native code or external C++ dependencies (mostly by using package or platform channels). This error often points to issues with the CMake configuration or conflicts in the build environment.

    The quick thing you can doto fix this issue by Clean and Clear Caches by.

    flutter clean 
    

    clears the build directory and removes any existing build outputs

    rm -rf bin
    rm -rf obj
    rm -rf .gradle
    

    Manually delete the bin, obj, and .gradle directories in your project. These directories may contain generated files and caches that could contribute to build issues.

    flutter pub cache repair
    

    this will delete and then redownload all the packages in your project. It’s a useful step in resolving issues that might be caused by corrupted or improperly downloaded packages.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search