Skip to content

Agent transitively upgrades androidx.core / androidx.navigation in consuming apps #1663

@SenNeonoveNoci

Description

@SenNeonoveNoci

android-agent currently brings AndroidX dependencies into consuming applications transitively, including at least:

  • androidx.core
  • androidx.navigation-runtime-ktx
  • androidx.navigation-fragment

From inspecting the repository and generated publication metadata, this appears to come from:

  • android-agent depending on core, services, and instrumentation:fragment
  • core publishing androidx.core
  • services publishing androidx.navigation-runtime-ktx
  • instrumentation:fragment publishing androidx.navigation-fragment

The main concern is that adding android-agent can affect dependency resolution in host applications and potentially change application behavior, even when the app is not explicitly trying to change its AndroidX versions.

Could you confirm whether it is intentional for android-agent to export these AndroidX dependencies transitively?

If not, it might be worth trimming down the transitive dependency surface a bit, especially around androidx.core and navigation-related artifacts.

Example impact we saw

In one of our client applications, after adding our Agent (splunk-otel-android) that uses opentelemetry-android, dependency resolution changed as follows:

  • androidx.core: 1.15.0 -> 1.16.0
  • androidx.navigation: 2.7.5 -> 2.7.7

In that app, this correlated with a different startup execution path that caused flickering / periodic recomposition during startup. Forcing those dependencies back to their previous versions removed the issue.

I understand that the application-side behavior is specific to clients app, but the transitive dependency upgrade itself appears to be reproducible and comes from android-agent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions