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

Skipping '//src/main:app': no such package 'src/main': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package. #213

Open
Kiru3014 opened this issue Jul 3, 2021 · 1 comment

Comments

@Kiru3014
Copy link

Kiru3014 commented Jul 3, 2021

Hi Trying to the example

https://docs.bazel.build/versions/3.3.0/tutorial/android-app.html

on running bazel build //src/main:app cmd in powershell
getting following error

image

android_binary folder
image

android_binary(
name = "app",
manifest = "AndroidManifest.xml",
deps = ["//src/main/java/com/example/bazel:greeter_activity"],
)

android_lib
image

package(
default_visibility = ["//src:subpackages"],
)

android_library(
name = "greeter_activity",
srcs = [
"Greeter.java",
"MainActivity.java",
],
manifest = "AndroidManifest.xml",
resource_files = glob(["res/**"]),
)

@evan505
Copy link

evan505 commented Dec 9, 2022

It seems like your WORKSPACE file is not located in the xx/examples/tutorial directory, so Bazel is finding the wrong root directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants