Replies: 1 comment 1 reply
-
You have checked out the repo with CR+LF. I think your problem will be resolved if checking out the code "as-is" instead. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys,
I have installed Ubuntu 20.04.6 LTS as a built-in Linux system in Windows 11.
When I try to build the Android Auto's Receiver Library by running these commands:
tools/bazel build --config=android_x86 //receiver-lib
,it's failed and with the below error message,
-bash: tools/bazel: /bin/bash^M: bad interpreter: No such file or directory.
The bazel in Ubuntu is Version 7.0.0.
Please help to analyze what's happening and how to sort the problem out.
The file system structure as below,
The file under folder 'tool' and named bazel has following contents.
=============================start==================================
#!/bin/bash
NDK_VERSION="r21"
PDK_DIR="$(readlink -f "$(dirname "$0")/..")"
TOP="$(readlink -f "${PDK_DIR}/../../..")"
# Set Android SDK and NDK directories.
case "$(uname -s)" in
Linux)
OS_TYPE="linux"
;;
Darwin)
OS_TYPE="darwin"
;;
*)
>&2 echo "Build only supported on Linux or Mac"
exit 1
;;
esac
# Set Android SDK and NDK directories.
export ANDROID_HOME="${TOP}/prebuilts/fullsdk/${OS_TYPE}"
export ANDROID_NDK_HOME="${TOP}/prebuilts/fullndk/${OS_TYPE}/${NDK_VERSION}"
# Override bazelrc.
export ANDROID_BAZELRC_PATH="${PDK_DIR}/bazel/common.bazelrc"
# We're doing a non-platform Bazel build.
export STANDALONE_BAZEL=1
# Run Android platform bazel.sh wrapper.
exec "${TOP}/build/bazel/bin/bazel" "$@"
=============================end==================================
Beta Was this translation helpful? Give feedback.
All reactions