APK doesn't include *.version files in metadata
维护者通常 6 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 领域
- build-system
调研方向
使用 rules_kotlin Jetpack Compose 示例重现该问题,并使用 zipinfo 比较 APK 和 deploy JAR。跟踪会过滤 META-INF/.version 文件的 Android APK 打包路径;当相关的 androidx.compose..version 文件存在于最终 APK 中,并且 Layout Inspector 能够识别 Compose 组件时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Android Studio's Layout Inspector has specific support for Jetpack Compose components, including recompositions. However, this requires certain files to be present in the final APK:
Note: If you're not seeing Compose components in layout inspector, make sure you are not removing META-INF/androidx.compose.*.version files from the APK. These are required for layout inspector to work.
These show up in the deploy jar, but get filtered out of the APK. When building rules_kotlin's Compose example:
$ zipinfo bazel-bin/app/compose_example_app.apk | grep META-INF
-rw---- 2.0 fat 52 b- stor 10-Jan-01 00:00 META-INF/services/kotlinx.coroutines.internal.MainDispatcherFactory
-rw---- 2.0 fat 54 b- stor 10-Jan-01 00:00 META-INF/services/kotlinx.coroutines.CoroutineExceptionHandler
-rw---- 2.0 fat 116511 b- defN 10-Jan-01 00:00 META-INF/CERT.SF
-rw---- 2.0 fat 1211 b- defN 10-Jan-01 00:00 META-INF/CERT.RSA
-rw---- 2.0 fat 116403 b- defN 10-Jan-01 00:00 META-INF/MANIFEST.MF
$ zipinfo bazel-bin/app/compose_example_app_deploy.jar | egrep 'META-INF/.*\.version'
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.activity_activity-compose.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.activity_activity-ktx.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.activity_activity.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.core_core.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.annotation_annotation-experimental.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.lifecycle_lifecycle-runtime.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.arch.core_core-runtime.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.versionedparcelable_versionedparcelable.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.lifecycle_lifecycle-viewmodel-savedstate.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.lifecycle_lifecycle-livedata-core.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.lifecycle_lifecycle-viewmodel.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.savedstate_savedstate.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.tracing_tracing.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.core_core-ktx.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.lifecycle_lifecycle-runtime-ktx.version
-rw---- 2.0 fat 5 b- stor 10-Jan-01 00:00 META-INF/kotlinx_coroutines_android.version
-rw---- 2.0 fat 5 b- stor 10-Jan-01 00:00 META-INF/kotlinx_coroutines_core.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.lifecycle_lifecycle-viewmodel-ktx.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.savedstate_savedstate-ktx.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.runtime_runtime-saveable.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.runtime_runtime.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.ui_ui.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.autofill_autofill.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.ui_ui-geometry.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.ui_ui-util.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.ui_ui-graphics.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.ui_ui-unit.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.ui_ui-text.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.customview_customview-poolingcontainer.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.profileinstaller_profileinstaller.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.startup_startup-runtime.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.appcompat_appcompat.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.appcompat_appcompat-resources.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.vectordrawable_vectordrawable-animated.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.interpolator_interpolator.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.vectordrawable_vectordrawable.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.cursoradapter_cursoradapter.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.drawerlayout_drawerlayout.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.customview_customview.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.emoji2_emoji2-views-helper.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.emoji2_emoji2.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.lifecycle_lifecycle-process.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.fragment_fragment.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.loader_loader.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.lifecycle_lifecycle-livedata.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.viewpager_viewpager.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.material_material.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.animation_animation-core.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.animation_animation.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.foundation_foundation-layout.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.foundation_foundation.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.material_material-icons-core.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.material_material-ripple.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.ui_ui-tooling.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.ui_ui-tooling-data.version
-rw---- 1.0 fat 6 b- stor 10-Jan-01 00:00 META-INF/androidx.compose.ui_ui-tooling-preview.version
- 主要语言
- Java
- 星标
- 205
- 派生
- 113
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bazelbuild/rules_android 的其他 Issue
-
build_java8_legacy_dex.sh does not set JAVA_RUNFILES for the d8/r8 launchers可能已有人在做 @TrapsterDK 于 17 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 72/100
bazelbuild/rules_android#599 ·
维护者通常 6 天内回复
-
`Desugar` actions don't run on multiplex workers可能已有人在做 @lukaciko 于 46 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
bazelbuild/rules_android#539 · 2 条评论 ·
维护者通常 6 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
bazelbuild/rules_android#535 · 2 个 reaction ·
维护者通常 6 天内回复
-
desugar_globals output is not reproducible (zip entry order varies)可能已有人在做 @TrapsterDK 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 30/100
bazelbuild/rules_android#610 ·
维护者通常 6 天内回复
-
难度 2/5 1-3 小时 新手友好度 42/100
bazelbuild/rules_android#602 ·
维护者通常 6 天内回复
查看 bazelbuild/rules_android 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
Lincoln-cn/JAiRouter#1473 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
exercism/java-analyzer#379 ·
-
area: ui bug priority: low
难度 2/5 1-3 小时 新手友好度 66/100
tetsuji16/microProject#1893 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
liberation-data/fornax4j#325 ·
维护者通常 1 天内回复
-
[Bug]: FE and Kinesis extraction pipes render flow starting at the centre and scroll the source arm backwards可能已有人在做 @chonkzillaofficial 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 79/100
BCCE-team/BuildCraft#85 ·