Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to launch app: unknown flag --nolaunch_app #2084

Closed
jagobagascon opened this issue Sep 15, 2020 · 7 comments
Closed

Unable to launch app: unknown flag --nolaunch_app #2084

jagobagascon opened this issue Sep 15, 2020 · 7 comments
Assignees
Labels

Comments

@jagobagascon
Copy link

jagobagascon commented Sep 15, 2020

When I try to run the app from the Android Studio UI the flag --nolaunch_app at the end of the command. That is triggering the following error:

Waiting for target device...
Invoking mobile-install...
Command: /usr/local/bin/bazel mobile-install --tool_tag=ijwb:AndroidStudio --device 94PAY0RKQL:tcp:5037 "--adb_arg=-s " --adb_arg=94PAY0RKQL --adb /Users/jagoba/Library/Android/sdk/platform-tools/adb --curses=no --color=yes --progress_in_terminal_title=no --build_event_binary_file=/var/folders/0p/db4t1g1d2zxgd91vl02ff0fw0000gn/T/intellij-bep-a9ded8a1-4a1a-4aca-95f9-923c12f3b377 --nobuild_event_binary_file_path_conversion -- //example/MyApp/src/main:android --nolaunch_app

Loading: 
Loading: 0 packages loaded
ERROR: Skipping '-nolaunch_app': couldn't determine target from filename '-nolaunch_app'
ERROR: couldn't determine target from filename '-nolaunch_app'
INFO: Elapsed time: 0.725s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
INFO: Build Event Protocol files produced successfully.
FAILED: Build did NOT complete successfully (0 packages loaded)

I haven't found any documentation about that flag in the bazel docs or in Google.

I managed to run the app by disabling the option "Use mobile-install". But I'm still curious about the --nolaunch_app flag that is failing.

@jagobagascon jagobagascon changed the title Unable to launch an app unknown flag --nolaunch_app Unable to launch app: unknown flag --nolaunch_app Sep 15, 2020
@jagobagascon jagobagascon changed the title Unable to launch app: unknown flag --nolaunch_app Unable to launch app: unknown flag --nolaunch_app Sep 15, 2020
@memostark
Copy link

I have the same problem with Android Studio 4.0.1 on Windows 10, using Bazel 3.7.1, plugin 2020.06.25.0.3. Can build and install apps using the terminal with no problems

ERROR: Skipping '-nolaunch_app': couldn't determine target from filename '-nolaunch_app'
ERROR: couldn't determine target from filename '-nolaunch_app'

@c1139676919
Copy link

I'm having the same problem on macos catalina 、Bazel3.4.0,

Waiting for target device...
Invoking mobile-install...
Command: /Users/mac/bin/bazel mobile-install --tool_tag=ijwb:AndroidStudio --device 65f58306:tcp:5037 "--adb_arg=-s " --adb_arg=65f58306 --adb /Users/mac/Library/Android/sdk/platform-tools/adb --curses=no --color=yes --progress_in_terminal_title=no -c opt --config=android_arm64 --build_event_binary_file=/var/folders/81/zyx3b9z17jb880v9_w95tr140000gn/T/intellij-bep-f1fcbe48-e7f3-4ba6-bb17-70d204ab27de --nobuild_event_binary_file_path_conversion -- //mediapipe/examples/android/src/java/com/google/mediapipe/apps/handtrackinggpu:handtrackinggpu --nolaunch_app

Loading:
Loading: 0 packages loaded
ERROR: Skipping '-nolaunch_app': no such target '//:-nolaunch_app': target '-nolaunch_app' not declared in package '' defined by /Users/mac/AndroidStudioProjects/mediapipe/BUILD.bazel
WARNING: Target pattern parsing failed.
ERROR: no such target '//:-nolaunch_app': target '-nolaunch_app' not declared in package '' defined by /Users/mac/AndroidStudioProjects/mediapipe/BUILD.bazel
INFO: Elapsed time: 0.071s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded)
FAILED: Build did NOT complete successfully (1 packages loaded)
INFO: Build Event Protocol files produced successfully.
FAILED: Build did NOT complete successfully (1 packages loaded)

Can anyone help me?You can add me at qq 1139676919,thanks.

@mai93 mai93 added product: Android Studio Android Studio plugin type: bug labels Feb 10, 2021
@geaden
Copy link

geaden commented Jun 15, 2021

Same issue on macOS Big Sur
Android Studio 4.2.1
Bazel 4.1

ERROR: Skipping '-nolaunch_app': no such target '//:-nolaunch_app': target '-nolaunch_app' not declared in package '' defined by /path/to/BUILD.bazel

Plugin version 2021.05.31.0.1

@mohammed-safwan
Copy link

Those who are stuck with this problem can use Build with Bazel in Command Line for deploying the apps.

@omardri
Copy link

omardri commented Jul 20, 2021

did anyone find the solution for that problem

@jimmyhoran
Copy link

Deleting the line

... and building a local version of the plugin has been the only solution I've found. I shared a bit more about it here #2328 (comment).

@TylerCarberry
Copy link
Contributor

@mai93 mai93 closed this as completed Oct 14, 2022
@mai93 mai93 self-assigned this Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants