Skip to content

Building using bazel error: Unrecognized option: --useDataBindingAndroidX #4141

Discussion options

You must be logged in to vote

I finally found a solution to this!

while executing these set of commands,

echo build --override_repository=android_tools="$(cd "$(dirname "$HOME/opensource/oppia-bazel-tools")"; pwd)/$(basename "$HOME/opensource/oppia-bazel-tools")" > ~/.bazelrc and
echo build --android_databinding_use_androidx >> ~/.bazelrc

replace $HOME with the location where your HOME environment variable points. That is, your root location. For ex, for me it was /home/jishnu.
If you are not sure what is your root location,
run this in terminal:
printenv HOME
and replace the output with $HOME in the above commands everywhere

Hope this helps!

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by JishnuGoyal
Comment options

BenHenning
Jan 31, 2022
Maintainer Sponsor

You must be logged in to vote
2 replies
@JishnuGoyal
Comment options

@BenHenning
Comment options

BenHenning Jan 31, 2022
Maintainer Sponsor

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