Fixed bug - amStartArgs not accepted in "launch" config #9

Open
opened 2025-08-09 17:12:54 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @jamesikanos on 8/5/2024

I was testing modifications to the AOSP Settings app in VSCode.

When launching a debugger using a config similar to below, the error: "Launch failed: No valid launch activity found in AndroidManifest.xml or launch.json".

Code was not checking for a valid amStartArgs. Modified to accept a non-zero-length array for amStartArgs.

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch Settings",
            "type": "android",
            "request": "launch",
            "targetDevice": "emulator-5554",
            "appSrcRoot": "${workspaceFolder}/packages/apps/Settings",
            "amStartArgs": [
                "-D",
                "--activity-brought-to-front",
                "-n com.android.settings/.homepage.SettingsHomepageActivity"
            ],
            "apkFile": "${workspaceRoot}/out/target/product/emulator_x86_64/system_ext/priv-app/Settings/Settings.apk"
        }
    ]
}
*Originally created by @jamesikanos on 8/5/2024* I was testing modifications to the AOSP Settings app in VSCode. When launching a debugger using a config similar to below, the error: "Launch failed: No valid launch activity found in AndroidManifest.xml or launch.json". Code was not checking for a valid amStartArgs. Modified to accept a non-zero-length array for amStartArgs. ```json { "version": "0.2.0", "configurations": [ { "name": "Launch Settings", "type": "android", "request": "launch", "targetDevice": "emulator-5554", "appSrcRoot": "${workspaceFolder}/packages/apps/Settings", "amStartArgs": [ "-D", "--activity-brought-to-front", "-n com.android.settings/.homepage.SettingsHomepageActivity" ], "apkFile": "${workspaceRoot}/out/target/product/emulator_x86_64/system_ext/priv-app/Settings/Settings.apk" } ] } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/android-dev-ext#9
No description provided.