Code Monkey home page Code Monkey logo

Comments (5)

ted-xie avatar ted-xie commented on August 10, 2024

IIRC I fixed this upstream in bazelbuild/bazel a while ago, but it hasn't made it into a release yet. If you use a build of bazel close to head (as our README suggests), this should build correctly.

from rules_android.

pswaminathan avatar pswaminathan commented on August 10, 2024

Thanks @ted-xie ! That does indeed get me farther, but still a failure:

bazel build --verbose_failures java/com/basicapp:basic_app
Starting local Bazel server and connecting to it...
INFO: Analyzed target //java/com/basicapp:basic_app (330 packages loaded, 16043 targets configured).
ERROR: /Users/p/Code/bazel/rules_android/examples/basicapp/java/com/basicapp/BUILD:9:16: Compiling Android Resources in java/com/basicapp/_migrated/basic_lib_symbols/symbols.zip failed: (Exit 2): java failed: error executing CompileAndroidResources command (from target //java/com/basicapp:basic_lib)
  (cd /private/var/tmp/_bazel_p/55ff8364e78f780939b7116c861984c8/sandbox/darwin-sandbox/1/execroot/_main && \
  exec env - \
  external/rules_java~~toolchains~remotejdk11_macos_aarch64/bin/java -Xms4G -Xmx4G -XX:+ExitOnOutOfMemoryError -jar bazel-out/darwin_arm64-opt-exec-ST-d57f47055a04/bin/external/bazel_tools/src/tools/android/java/com/google/devtools/build/android/ResourceProcessorBusyBox_deploy.jar --tool COMPILE_LIBRARY_RESOURCES -- --aapt2 bazel-out/darwin_arm64-opt-exec-ST-d57f47055a04/bin/external/rules_android~~android_sdk_repository_extension~androidsdk/aapt2_binary --resources java/com/basicapp/res:::: --output bazel-out/darwin_arm64-fastbuild-android-ST-80dd4ae33d52/bin/java/com/basicapp/_migrated/basic_lib_symbols/symbols.zip --targetLabel //java/com/basicapp:basic_lib --manifest bazel-out/darwin_arm64-fastbuild-android-ST-80dd4ae33d52/bin/java/com/basicapp/_migrated/_min_sdk_bumped/basic_lib/AndroidManifest.xml --androidJar external/rules_android~~android_sdk_repository_extension~androidsdk/platforms/android-34/android.jar)
# Configuration: e0ee379e8deebddd77b721799537f6bcb4ec2a7c5aeb6e253cef82be0b0f4583
# Execution platform: @@platforms//host:host

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
Error parsing command line: Unrecognized option: --targetLabel
Try --help.
Target //java/com/basicapp:basic_app failed to build
INFO: Elapsed time: 5.983s, Critical Path: 0.42s
INFO: 2 processes: 2 internal.
ERROR: Build did NOT complete successfully

from rules_android.

ahumesky avatar ahumesky commented on August 10, 2024

I wasn't able to repro this -- the error is pretty surprising: Error parsing command line: Unrecognized option: --targetLabel. This is the code that creates that COMPILE_LIBRARY_RESOURCES action:

args.add("--tool", "COMPILE_LIBRARY_RESOURCES")

and --targetLabel is not added there, and it doesn't look like it was there before. Are you using some local customizations?

from rules_android.

pswaminathan avatar pswaminathan commented on August 10, 2024

Whoops, turns out I do have some local customizations that I had forgotten about. I'll revert back to main and try again.

from rules_android.

ted-xie avatar ted-xie commented on August 10, 2024

Cool, thanks for letting us know. Feel free to re-open if you run into this again with an unmodified Bazel + unmodified rules_android.

from rules_android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.