김병훈
김병훈

Reputation: 11

CXX1429: error when building with cmake using app\src\main\cpp\CMakeLists.txt: C++ build system [prefab] failed while executing

I was trying to build android vulkan app from this guide

Whenever I try to build, execution error occurred in "app\build\intermediates\cxx\Debug\1k4v2e55\logs\arm64-v8a\prefab_command.bat" file.

When I take a look at the batch script, It seems because of double quoting, used with escape character, caret(^). When I wrap this one more double quoting, then the script seemed to work well when I run it locally. But as this script is generated during Gradle Sync, so I wonder how to workaround this.

Is there anybody experienced the same problem ??

Here's the script.

@echo off
"C:\\Program Files\\Android\\Android Studio\\jbr\\bin\\java" ^
  --class-path ^
  "C:\\Users\\Public\\Downloads\\AndroidGradleCache\\caches\\modules-2\\files-2.1\\com.google.prefab\\cli\\2.1.0\\aa32fec809c44fa531f01dcfb739b5b3304d3050\\cli-2.1.0-all.jar" ^
  com.google.prefab.cli.AppKt ^
  --build-system ^
  cmake ^
  --platform ^
  android ^
  --abi ^
  arm64-v8a ^
  --os-version ^
  30 ^
  --stl ^
  c++_shared ^
  --ndk-version ^
  25 ^
  --output ^
  "C:\\Users\\<UserName>\\AppData\\Local\\Temp\\agp-prefab-staging173918899557672872\\staged-cli-output" ^
  "C:\\Users\\Public\\Downloads\\AndroidGradleCache\\caches\\8.9\\transforms\\d32a77d7e7bb7e9756a33ac5cd5bf668\\transformed\\jetified-games-activity-4.0.0-alpha01\\prefab"

And here's the stderr. It seems like cmd.exe couldn't parse the script correctly, maybe because of caret(^)(?).

'\Program'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는
배치 파일이 아닙니다.
'class-path'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는
배치 파일이 아닙니다.
'm.google.prefab.cli.AppKt'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는
배치 파일이 아닙니다.
'"C:\\Users\\Public\\Downloads\\AndroidGradleCache\\caches\\8.9\\transforms\\d32a77d7e7bb7e9756a33ac5cd5bf668\\transformed\\jetified-games-activity-4.0.0-alpha01\\prefab"'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는
배치 파일이 아닙니다.

OS: Windows 11 Pro, 22H2, 22621.2861 SDK: 34 NDK: 25.2.9519653 CMake: 3.22.1 Dependencies: I tried games-activity:2.0.0, 3.0.0, 4.0.0

Upvotes: 1

Views: 394

Answers (0)

Related Questions