-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--android_aapt=aapt2 doesn't work on 0.13.0 with aar_import deps #5214
Comments
Manual hard crash with stacktrace:
|
Ok, here's the crashing command:
According to DependencyAndroidData (https://github.com/bazelbuild/bazel/blob/d18d3e2f83f9d582858a3edab7a450c60044028c/src/tools/android/java/com/google/devtools/build/android/DependencyAndroidData.java), the
However, the actual arguments are missing
@asteinb @corbinrsmith-work I'm still not quite familiar with resource processing -- is |
Ok, it definitely seems like |
Bumping to P0, this is an important component of Android builds and should be fixed asap. |
Using
|
aar_import
deps
Ok, narrowed it down to just |
aar_import
deps
AFAIK aar_import completely ignores the R.txt. It’s not unpacked anywhere |
This prevents an invalid flag like `resources:assets:AndroidManifest.xml:::local.bin` to match, as with the case in #5214 where the R.txt file is missing (shouldn't happen, but let's be defensive) Error message: ``` .. invalid DependencyAndroidData: bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/_aar/unzipped/resources/support-compat-25.0.0/res:bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/_aar/unzipped/assets/support-compat-25.0.0/assets:bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/support-compat-25.0.0_processed_manifest/AndroidManifest.xml:::bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/support-compat-25.0.0_symbols/local.bin is not in the format 'resources[#resources]:assets[#assets]:manifest:r.txt(:symbols.zip?):symbols.bin' ``` RELNOTES: None. PiperOrigin-RevId: 198724816
@aj-michael that explains it, thanks. Looks like we'll need to hook up aapt2 to compile/link resources in the imported AAR and expose R.aapt2.txt downstream. |
Fixed by @corbinrsmith-work in 0163083 |
I'm still getting this error with Bazel 0.29+ (including 1+) but with |
Still getting this error
|
This prevents an invalid flag like `resources:assets:AndroidManifest.xml:::local.bin` to match, as with the case in bazelbuild/bazel#5214 where the R.txt file is missing (shouldn't happen, but let's be defensive) Error message: ``` .. invalid DependencyAndroidData: bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/_aar/unzipped/resources/support-compat-25.0.0/res:bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/_aar/unzipped/assets/support-compat-25.0.0/assets:bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/support-compat-25.0.0_processed_manifest/AndroidManifest.xml:::bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/support-compat-25.0.0_symbols/local.bin is not in the format 'resources[#resources]:assets[#assets]:manifest:r.txt(:symbols.zip?):symbols.bin' ``` RELNOTES: None. PiperOrigin-RevId: 198724816
aapt works:
aapt2 doesn't:
--verbose_failures
:The text was updated successfully, but these errors were encountered: