From 8541c83bf52e577ce7b822808aaa18233e147762 Mon Sep 17 00:00:00 2001 From: hailin Date: Wed, 31 Dec 2025 23:43:51 -0800 Subject: [PATCH] fix(android): remove quotes from ANDROID_HOME path in build-apk.bat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When ANDROID_HOME environment variable contains quotes (e.g., set with quotes in system settings), the generated local.properties file would have an invalid path like 'sdk.dir=C:/Android"'. This fix strips any surrounding quotes from ANDROID_HOME before using it to create local.properties, ensuring valid SDK path format. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../services/service-party-android/build-apk.bat | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/mpc-system/services/service-party-android/build-apk.bat b/backend/mpc-system/services/service-party-android/build-apk.bat index f2ed32e8..b7ace430 100644 --- a/backend/mpc-system/services/service-party-android/build-apk.bat +++ b/backend/mpc-system/services/service-party-android/build-apk.bat @@ -23,9 +23,12 @@ if not exist "local.properties" ( :: Check ANDROID_HOME environment variable first if defined ANDROID_HOME ( - if exist "!ANDROID_HOME!\platform-tools" ( - echo sdk.dir=!ANDROID_HOME:\=/!> local.properties - echo [INFO] Created local.properties with ANDROID_HOME: !ANDROID_HOME! + :: Remove any surrounding quotes from ANDROID_HOME + set "ANDROID_HOME_CLEAN=!ANDROID_HOME:"=!" + if exist "!ANDROID_HOME_CLEAN!\platform-tools" ( + set "SDK_PATH_CLEAN=!ANDROID_HOME_CLEAN:\=/!" + echo sdk.dir=!SDK_PATH_CLEAN!> local.properties + echo [INFO] Created local.properties with ANDROID_HOME: !ANDROID_HOME_CLEAN! set SDK_FOUND=1 ) )