1

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

  • Changing NDK, CMake versions
  • Changing games-activity version
  • Changing the script manually and run it (wrapping one more double quotes)
1
  • 1
    It was because of korean letter in file path: C:\\Users\\<UserName>.. It seems that Android Studio cannot recognize any non-ascii character. I made a new User, username with alphabets, and give admin authority, and setup gradle in this path. Hope to save time for someone who faces this problem.. Commented Dec 10, 2024 at 12:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.