diff --git a/packages/cli-platform-android/src/commands/runAndroid/listAndroidTasks.ts b/packages/cli-platform-android/src/commands/runAndroid/listAndroidTasks.ts index ca6535f9d..6859bfb01 100644 --- a/packages/cli-platform-android/src/commands/runAndroid/listAndroidTasks.ts +++ b/packages/cli-platform-android/src/commands/runAndroid/listAndroidTasks.ts @@ -17,7 +17,7 @@ export const parseTasksFromGradleFile = ( taskType === 'build' ? '^assemble|^bundle' : '^install', ); text.split('\n').forEach((line) => { - if (taskRegex.test(line) && /(?!.*?Test)^.*$/.test(line)) { + if (taskRegex.test(line.trim()) && /(?!.*?Test)^.*$/.test(line.trim())) { const metadata = line.split(' - '); instalTasks.push({ task: metadata[0],