Comments (7)
Looks like the issue is RourceDependencies.fromRuleDeps
, which is looking for the AndroidResourceInfo.PROVIDER
provider. This is present with the master branch, but not with the pre-alpha, which I assume is due to starlarkifying android_library
.
from rules_android.
Yes, looks like the native android_library
calls AndroidResources.from
, which collects the AndroidResourceInfo
providers, but the version in pre-alpha does not.
from rules_android.
Okay, finally figured out the issue.
The pre-alpha version of resource collection (as implemented in rules/resources.bzl
only checks for the existence of StarlarkAndroidResourcesInfo
, not the native AndroidResourcesInfo
.
The Starlark version of aar_import
creates this provider, as expected.
However, the code in examples/android/ndk depends on appcompat via maven_install
from rules_jvm_external
, which creates an aar_import
target using the native rules, which uses the native provider.
Either the pre-alpha branch needs to check for both possible providers, or rules_jvm_export needs to use the same pre-alpha version of aar_import, or rules_jvm_export isn't compatible with rules_android pre-alpha.
from rules_android.
Looks like rules_jvm_external has support for this, possibly.
from rules_android.
But even using the starlark aar_import
, the target @maven//:androidx_appcompat_appcompat
doesn't have the StarlarkAndroidResourcesInfo
provider.
Using native aar_import
to list provider names:
$ /tmp/blazes/bazel cquery --output=starlark --starlark:expr='providers(target).keys()' @maven//:androidx_appcompat_appcompat_resources
[
"InstrumentedFilesInfo",
"AndroidResourcesInfo",
"AndroidManifestInfo",
"AndroidAssetsInfo",
"DataBindingV2Info",
"ProguardSpecProvider",
"AndroidNativeLibsInfo",
"JavaInfo",
"FileProvider",
"FilesToRunProvider",
"OutputGroupInfo",
]
Using Starlark aar_import
to list provider names:
$ /tmp/blazes/bazel cquery --output=starlark --starlark:expr='providers(target).keys()' @maven//:androidx_appcompat_appcompat_resources
[
"AndroidLibraryResourceClassJarProvider",
"JavaInfo",
"AndroidNativeLibsInfo",
"ProguardSpecProvider",
"AndroidIdeInfo",
"FileProvider",
"FilesToRunProvider",
"OutputGroupInfo",
]
from rules_android.
Retitled issue to clarify the root cause.
from rules_android.
This should be fixed if/when we merge https://github.com/bazelbuild/rules_android/pull/52/files#diff-e2839f4bd7500de02db70226d1fb363bc1bcd62e2ac7046594dafc3e7040fa09.
from rules_android.
Related Issues (20)
- The Starlark implementaiton of process_deploy_jar fails to execute java.create_deploy_jar HOT 5
- Build fails when `--incremental_dexing` is disabled HOT 1
- Remove dependencies on --experimental_google_legacy_api and --experimental_enable_android_migration_apis HOT 2
- Can't build example basicapp HOT 5
- _copy_file and _copy_dir fail on macOS
- AAR libraries from Maven don't expose their resources unlike in built-in Android rules HOT 3
- Mobile install v3 doesn't work with --start=debug HOT 1
- Flags underneath rules/flags/ aren't working correctly HOT 1
- Android platforms breaks incremental dexing and desugaring HOT 4
- mobile-install fails with dependencies from rules_jvm_external HOT 7
- Unable to build with rules_android due to maven install issue HOT 2
- [Bazel CI] android_sdk_repository & android_sdk_repository_platforms_tests are failing with Bazel@HEAD HOT 1
- Bazel query broken at HEAD
- [Bazel CI] ERROR occurred during the fetch of repository 'rules_android_maven'
- APK doesn't include *.version files in metadata
- Rules use entire Android SDK dir as input instead of explicit files which may case poor cache hit HOT 1
- documentation for targets under android_sdk_repository
- Bash is not necessarily in /bin/bash
- No matching toolchains found for types @@bazel_tools//tools/android:sdk_toolchain_type even though called register_toolchains HOT 2
- [FR] Option for mobile-install command to install to all connected devices
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_android.