platforms/android-23/core-for-system-modules.jar missing
Maintainers usually reply within 6 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- build-system
Research direction
Reproduce with the supplied SDK layouts and MODULE.bazel configuration, starting with bazel build @rules_android//:androidsdk_files. Inspect the android_sdk_repository_extension setup and the generated androidsdk target, especially the referenced platforms/android-23/core-for-system-modules.jar. Done means the target builds with SDKs containing API 23 alone, API 30 alone, and both platforms.
Written by the indexing model from the issue text.
Description
I'm trying to build my library for Android using Bazel, and depending on the way I install the SDK things fail.
For this issue, we using bzlmod.
To reproduce, I first install the SDK in /tmp/core-for-system-modules-repro/
rm -rf /tmp/core-for-system-modules-repro
mkdir /tmp/core-for-system-modules-repro
cd /tmp/core-for-system-modules-repro
mkdir sdk_with_23/
mkdir sdk_with_30/
mkdir sdk_with_23_and_30
wget https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip
unzip commandlinetools-linux-8512546_latest.zip
yes | cmdline-tools/bin/sdkmanager --sdk_root=/tmp/core-for-system-modules-repro/sdk_with_23/ "build-tools;30.0.3" "platform-tools" "platforms;android-23"
yes | cmdline-tools/bin/sdkmanager --sdk_root=/tmp/core-for-system-modules-repro/sdk_with_23_and_30/ "build-tools;30.0.3" "platform-tools" "platforms;android-23" "platforms;android-30"
yes | cmdline-tools/bin/sdkmanager --sdk_root=/tmp/core-for-system-modules-repro/sdk_with_30/ "build-tools;30.0.3" "platform-tools" "platforms;android-30"
We then create MODULE.bazel and .bazelversion:
cat > MODULE.bazel <<EOF
bazel_dep(name = "rules_java", version = "7.11.1")
bazel_dep(name = "bazel_skylib", version = "1.3.0")
bazel_dep(name = "rules_android", version = "0.6.6")
remote_android_extensions = use_extension(
"@rules_android//bzlmod_extensions:android_extensions.bzl",
"remote_android_tools_extensions")
use_repo(remote_android_extensions, "android_tools")
android_sdk_repository_extension = use_extension("@rules_android//rules/android_sdk_repository:rule.bzl", "android_sdk_repository_extension")
use_repo(android_sdk_repository_extension, "androidsdk")
android_sdk_repository_extension.configure(build_tools_version = "30.0.3", api_level = 30, path="/tmp/core-for-system-modules-repro/sdk")
register_toolchains("@androidsdk//:sdk-toolchain", "@androidsdk//:all")
EOF
cat > .bazelversion <<EOF
8.4.1
EOF
Building with sdk_with_30 works:
cp -r sdk_with_30 sdk
bazel clean; bazel build @rules_android//:androidsdk_files
(INFO: Build completed successfully, 1 total action)
However, building with sdk_with_23_and_30 doesn't work:
rm -rf sdk; cp -r sdk_with_23_and_30 sdk
bazel clean; bazel build @rules_android//:androidsdk_files
ERROR: /home/tholenst/.cache/bazel/_bazel_tholenst/8459a255b91a183168e554695f792479/external/rules_android++android_sdk_repository_extension+androidsdk/BUILD.bazel:57:25: @@rules_android+//:androidsdk_files: missing input file '@@rules_android++android_sdk_repository_extension+androidsdk//:platforms/android-23/core-for-system-modules.jar'
This is a bit weird to me since I'm even selecting for api_level 30. It might be that I'm misunderstanding something, however.
I'd also like to build my library with api_level 23 only.
- Dominant language
- Java
- Stars
- 205
- Forks
- 113
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bazelbuild/rules_android
-
build_java8_legacy_dex.sh does not set JAVA_RUNFILES for the d8/r8 launchersPossibly taken @TrapsterDK claimed this 17 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bazelbuild/rules_android#599 ·
Maintainers usually reply within 6 days
-
`Desugar` actions don't run on multiplex workersPossibly taken @lukaciko claimed this 46 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
bazelbuild/rules_android#539 · 2 comments ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
bazelbuild/rules_android#535 · 2 reactions ·
Maintainers usually reply within 6 days
-
desugar_globals output is not reproducible (zip entry order varies)Possibly taken @TrapsterDK claimed this 6 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
bazelbuild/rules_android#610 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
bazelbuild/rules_android#602 ·
Maintainers usually reply within 6 days
All issues in bazelbuild/rules_android
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Lincoln-cn/JAiRouter#1473 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
exercism/java-analyzer#379 ·
-
area: ui bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
tetsuji16/microProject#1893 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
liberation-data/fornax4j#325 ·
Maintainers usually reply within 1 day
-
[Bug]: FE and Kinesis extraction pipes render flow starting at the centre and scroll the source arm backwardsPossibly taken @chonkzillaofficial claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
BCCE-team/BuildCraft#85 ·