SieR-VR/usc-app

How can I build with Macos Andriod Studio?

wohehehe opened this issue · 2 comments

How can I build with Macos Andriod Studio?

When I try to build, it always will show the problem about CMake
But I just put the environment varrible correcly
This is my log:

dr.feng@Mac-Studio usc-app % ./gradlew assembleDebug

Task :app:configureCMakeDebug[arm64-v8a] FAILED
C/C++: debug|arm64-v8a :CMake Error at /Users/dr.feng/usc-app/vcpkg/scripts/buildsystems/vcpkg.cmake:860 (message):
C/C++: debug|arm64-v8a : vcpkg install failed. See logs for more information:
C/C++: debug|arm64-v8a : /Users/dr.feng/usc-app/app/.cxx/Debug/5236m5e1/arm64-v8a/vcpkg-manifest-install.log
C/C++: debug|arm64-v8a :Call Stack (most recent call first):
C/C++: debug|arm64-v8a : /Users/dr.feng/Library/Android/sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeDetermineSystem.cmake:93 (include)
C/C++: debug|arm64-v8a : CMakeLists.txt:20 (project)

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:configureCMakeDebug[arm64-v8a]'.

[CXX1405] error when building with cmake using /Users/dr.feng/usc-app/app/src/main/cpp/CMakeLists.txt: Build command failed.
Error while executing process /Users/dr.feng/Library/Android/sdk/cmake/3.18.1/bin/cmake with arguments {-H/Users/dr.feng/usc-app/app/src/main/cpp -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=30 -DANDROID_PLATFORM=android-30 -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DANDROID_NDK=/Users/dr.feng/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_ANDROID_NDK=/Users/dr.feng/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_MAKE_PROGRAM=/Users/dr.feng/Library/Android/sdk/cmake/3.18.1/bin/ninja -DCMAKE_CXX_FLAGS=-std=c++17 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/dr.feng/usc-app/app/build/intermediates/cxx/Debug/5236m5e1/obj/arm64-v8a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/dr.feng/usc-app/app/build/intermediates/cxx/Debug/5236m5e1/obj/arm64-v8a -DCMAKE_BUILD_TYPE=Debug -B/Users/dr.feng/usc-app/app/.cxx/Debug/5236m5e1/arm64-v8a -GNinja -DANDROID_STL=c++_shared -DANDROID_SYSROOT_PATH=/Users/dr.feng/Library/Android/sdk/ndk/21.4.7075529/sysroot/usr -DANDROID=1 -DANDROID_NDK_PLATFORM=/Users/dr.feng/Library/Android/sdk/ndk/21.4.7075529/platforms/android-30/arch-arm64/usr/lib -DCMAKE_TOOLCHAIN_FILE=/Users/dr.feng/usc-app/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=/Users/dr.feng/Library/Android/sdk/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DVCPKG_TARGET_TRIPLET=arm64-android -DANDROID_ABI=arm64-v8a}
-- Running vcpkg install
Detecting compiler hash for triplet arm64-osx...
error: while detecting compiler information:
The log file content at "/Users/dr.feng/usc-app/vcpkg/buildtrees/detect_compiler/stdout-arm64-osx.log" is:
-- Configuring arm64-osx-rel
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:96 (message):
Command failed: /Users/dr.feng/usc-app/vcpkg/downloads/tools/cmake-3.24.0-osx/cmake-3.24.0-macos-universal/CMake.app/Contents/bin/cmake /Users/dr.feng/usc-app/vcpkg/scripts/detect_compiler -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/Users/dr.feng/usc-app/vcpkg/packages/detect_compiler_arm64-osx -DCMAKE_MAKE_PROGRAM=/Users/dr.feng/usc-app/vcpkg/downloads/tools/ninja/1.10.2-osx/ninja -DCMAKE_SYSTEM_NAME=Darwin -DBUILD_SHARED_LIBS=OFF -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=/Users/dr.feng/usc-app/vcpkg/scripts/toolchains/osx.cmake -DVCPKG_TARGET_TRIPLET=arm64-osx -DVCPKG_SET_CHARSET_FLAG=ON -DVCPKG_PLATFORM_TOOLSET=external -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE -DCMAKE_VERBOSE_MAKEFILE=ON -DVCPKG_APPLOCAL_DEPS=OFF -DCMAKE_TOOLCHAIN_FILE=/Users/dr.feng/usc-app/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON -DVCPKG_CXX_FLAGS= -DVCPKG_CXX_FLAGS_RELEASE= -DVCPKG_CXX_FLAGS_DEBUG= -DVCPKG_C_FLAGS= -DVCPKG_C_FLAGS_RELEASE= -DVCPKG_C_FLAGS_DEBUG= -DVCPKG_CRT_LINKAGE=dynamic -DVCPKG_LINKER_FLAGS= -DVCPKG_LINKER_FLAGS_RELEASE= -DVCPKG_LINKER_FLAGS_DEBUG= -DVCPKG_TARGET_ARCHITECTURE=arm64 -DCMAKE_INSTALL_LIBDIR:STRING=lib -DCMAKE_INSTALL_BINDIR:STRING=bin -D_VCPKG_ROOT_DIR=/Users/dr.feng/usc-app/vcpkg -DZ_VCPKG_ROOT_DIR=/Users/dr.feng/usc-app/vcpkg -D_VCPKG_INSTALLED_DIR=/Users/dr.feng/usc-app/app/.cxx/Debug/5236m5e1/arm64-v8a/vcpkg_installed -DVCPKG_MANIFEST_INSTALL=OFF -DCMAKE_OSX_ARCHITECTURES=arm64
Working Directory: /Users/dr.feng/usc-app/vcpkg/buildtrees/detect_compiler/arm64-osx-rel
Error code: 1
See logs for more information:
/Users/dr.feng/usc-app/vcpkg/buildtrees/detect_compiler/config-arm64-osx-rel-CMakeCache.txt.log
/Users/dr.feng/usc-app/vcpkg/buildtrees/detect_compiler/config-arm64-osx-rel-out.log
/Users/dr.feng/usc-app/vcpkg/buildtrees/detect_compiler/config-arm64-osx-rel-err.log

Call Stack (most recent call first):
scripts/cmake/vcpkg_configure_cmake.cmake:328 (vcpkg_execute_required_process)
scripts/detect_compiler/portfile.cmake:18 (vcpkg_configure_cmake)
scripts/ports.cmake:147 (include)

error: vcpkg was unable to detect the active compiler's information. See above for the CMake failure output.
-- Running vcpkg install - failed
-- Configuring incomplete, errors occurred!

CMake Error at /Users/dr.feng/usc-app/vcpkg/scripts/buildsystems/vcpkg.cmake:860 (message):
vcpkg install failed. See logs for more information:
/Users/dr.feng/usc-app/app/.cxx/Debug/5236m5e1/arm64-v8a/vcpkg-manifest-install.log
Call Stack (most recent call first):
/Users/dr.feng/Library/Android/sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeDetermineSystem.cmake:93 (include)
CMakeLists.txt:20 (project)

  • 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.

BUILD FAILED in 3s
29 actionable tasks: 1 executed, 28 up-to-date

Due prebuilt application is released, close this issue.