Skip to content

Android Hello World app requires android.useAndroidX=true #11835

Closed as duplicate of#11836
@haluzpav

Description

@haluzpav

What version of gRPC-Java are you using?

1.69.0

What is your environment?

MacOS Sequoia 15.0.1
javac 23.0.1
Android Studio Ladybug Feature Drop | 2024.2.2

What did you expect to see?

Working hello world project on Android

What did you see instead?

Building client app fails with

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:extractIncludeDebugProto'.
> Configuration `:app:debugRuntimeClasspath` contains AndroidX dependencies, but the `android.useAndroidX` property is not enabled, which may cause runtime issues.
  Set `android.useAndroidX=true` in the `gradle.properties` file and retry.
  The following AndroidX dependencies are detected:
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.annotation:annotation:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.core:core:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.collection:collection:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.core:core:1.0.0 -> androidx.lifecycle:lifecycle-runtime:2.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.core:core:1.0.0 -> androidx.lifecycle:lifecycle-runtime:2.0.0 -> androidx.lifecycle:lifecycle-common:2.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.core:core:1.0.0 -> androidx.lifecycle:lifecycle-runtime:2.0.0 -> androidx.arch.core:core-common:2.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.core:core:1.0.0 -> androidx.versionedparcelable:versionedparcelable:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.cursoradapter:cursoradapter:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.legacy:legacy-support-core-utils:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.legacy:legacy-support-core-utils:1.0.0 -> androidx.documentfile:documentfile:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.fragment:fragment:1.0.0 -> androidx.loader:loader:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.fragment:fragment:1.0.0 -> androidx.loader:loader:1.0.0 -> androidx.lifecycle:lifecycle-livedata:2.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.fragment:fragment:1.0.0 -> androidx.loader:loader:1.0.0 -> androidx.lifecycle:lifecycle-livedata:2.0.0 -> androidx.arch.core:core-runtime:2.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.fragment:fragment:1.0.0 -> androidx.loader:loader:1.0.0 -> androidx.lifecycle:lifecycle-livedata:2.0.0 -> androidx.lifecycle:lifecycle-livedata-core:2.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.fragment:fragment:1.0.0 -> androidx.lifecycle:lifecycle-viewmodel:2.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.legacy:legacy-support-core-utils:1.0.0 -> androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.legacy:legacy-support-core-utils:1.0.0 -> androidx.print:print:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.fragment:fragment:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.fragment:fragment:1.0.0 -> androidx.legacy:legacy-support-core-ui:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.fragment:fragment:1.0.0 -> androidx.legacy:legacy-support-core-ui:1.0.0 -> androidx.customview:customview:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.fragment:fragment:1.0.0 -> androidx.legacy:legacy-support-core-ui:1.0.0 -> androidx.viewpager:viewpager:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.fragment:fragment:1.0.0 -> androidx.legacy:legacy-support-core-ui:1.0.0 -> androidx.coordinatorlayout:coordinatorlayout:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.fragment:fragment:1.0.0 -> androidx.legacy:legacy-support-core-ui:1.0.0 -> androidx.drawerlayout:drawerlayout:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.fragment:fragment:1.0.0 -> androidx.legacy:legacy-support-core-ui:1.0.0 -> androidx.slidingpanelayout:slidingpanelayout:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.fragment:fragment:1.0.0 -> androidx.legacy:legacy-support-core-ui:1.0.0 -> androidx.interpolator:interpolator:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.fragment:fragment:1.0.0 -> androidx.legacy:legacy-support-core-ui:1.0.0 -> androidx.swiperefreshlayout:swiperefreshlayout:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.fragment:fragment:1.0.0 -> androidx.legacy:legacy-support-core-ui:1.0.0 -> androidx.asynclayoutinflater:asynclayoutinflater:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.vectordrawable:vectordrawable:1.0.0
  :app:debugRuntimeClasspath -> androidx.appcompat:appcompat:1.0.0 -> androidx.vectordrawable:vectordrawable-animated:1.0.0

Steps to reproduce the bug

https://grpc.io/docs/platforms/android/java/quickstart/#run-the-example

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