Skip to content

grpc-io : update prerequisites with AndroidX with java version guidence in quickstart.md #1452

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion content/en/docs/platforms/android/java/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@ weight: 10
- An android device set up for [USB debugging][] or an
[Android Virtual Device][]

- Add the following line in your gradle.properties to ensure compatibility with Android tooling and libraries:
**android.useAndroidX=true**

{{% alert title="Note" color="info" %}}
gRPC Java does not support running a server on an Android device. For this
quick start, the Android client app will connect to a server running on your
local (non-Android) computer.
{{% /alert %}}

For AGP 7.x, it's recommended to use Java 11 - 20 to avoid DexWorkAction / D8 issues.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move/merge this up earlier near/with the "Prerequisites". I don't think we need to give all the details here. Just something more like, "The example defaults to AGP 7.x which needs Java 11-17. If you upgrade it to AGP 8.x, it needs Java 17+"

Java 21+ (which produces bytecode version 65+) is not supported by AGP 7.x and will result in build failures due to bytecode incompatibility. AGP 7.x supports up to bytecode version 61.
Note that AGP 8.x and later explicitly require Java 17 as the minimum version.{{% /alert %}}

### Get the example code

Expand Down