Skip to content

Commit 2728761

Browse files
yufengwangcapull[bot]
authored andcommitted
Update build instructions for Java Matter Controller (#23182)
1 parent 4c185ac commit 2728761

File tree

1 file changed

+32
-13
lines changed

1 file changed

+32
-13
lines changed

examples/java-matter-controller/README.md

+32-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Matter Controller Java App Example
22

3-
This is a Matter Controller Java app that can be used to uses Matter to send
4-
messages to a Matter server.
3+
This is a Matter Controller Java app that can be used to commission and control
4+
Matter accessory devices. It offers the following features: - Commission a
5+
Matter device - Send echo requests to the Matter echo server - Send on/off
6+
cluster requests to a Matter device
57

68
<hr>
79

810
- [Matter Controller Java App Example](#matter-controller-java-app-example)
911
- [Requirements for building](#requirements-for-building)
10-
- [Gradle & JDK Version](#gradle--jdk-version)
1112
- [Preparing for build](#preparing-for-build)
1213
- [Building & Running the app](#building--running-the-app)
1314

@@ -17,23 +18,41 @@ messages to a Matter server.
1718

1819
## Requirements for building
1920

20-
You need Android SDK 21 & NDK downloaded to your machine. Set the
21+
You need Android SDK 21 & NDK 21.4.7075529 downloaded to your machine. Set the
2122
`$ANDROID_HOME` environment variable to where the SDK is downloaded and the
2223
`$ANDROID_NDK_HOME` environment variable to point to where the NDK package is
2324
downloaded.
2425

25-
<a name="jdk"></a>
26+
1. Install [Android Studio](https://developer.android.com/studio)
27+
2. Install NDK:
28+
1. Tools -> SDK Manager -> SDK Tools Tab
29+
2. Click [x] Show Package Details
30+
3. Select NDK (Side by Side) -> 21.4.7075529
31+
4. Apply
32+
3. Install Command Line Tools:
33+
1. Tools -> SDK Manager -> SDK Tools Tab -> Android SDK Command Line Tools
34+
(latest)
35+
2. Apply
36+
4. Install SDK 21:
37+
1. Tools -> SDK Manager -> SDK Platforms Tab -> Android 5.0 (Lollipop) SDK
38+
Level 21
39+
2. Apply
40+
5. Install Emulator:
41+
1. Tools -> Device Manager -> Create device -> Pixel 5 -> Android S API 31
42+
-> Download
43+
44+
### Linux
2645

27-
### Gradle & JDK Version
28-
29-
We are using Gradle 7.1.1 for all android project which does not support Java 17
30-
(https://docs.gradle.org/current/userguide/compatibility.html) while the default
31-
JDK version on MacOS for Apple Silicon is 'openjdk 17.0.1' or above.
46+
```
47+
export ANDROID_HOME=~/Android/Sdk
48+
export ANDROID_NDK_HOME=~/Android/Sdk/ndk/21.4.7075529
49+
```
3250

33-
Using JDK bundled with Android Studio will help with that.
51+
### MacOS
3452

35-
```shell
36-
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/Contents/Home/
53+
```
54+
export ANDROID_HOME=~/Library/Android/sdk
55+
export ANDROID_NDK_HOME=~/Library/Android/sdk/ndk/21.4.7075529
3756
```
3857

3958
<hr>

0 commit comments

Comments
 (0)