Skip to content
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

APK doesn't include *.version files in metadata #243

Open
pswaminathan opened this issue Jul 8, 2024 · 0 comments
Open

APK doesn't include *.version files in metadata #243

pswaminathan opened this issue Jul 8, 2024 · 0 comments

Comments

@pswaminathan
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant