Skip to content

Commit 5e90e51

Browse files
Added note under "Project Setup" about Robolectric test failures with JDK 21.
Recommend using OpenJDK 17.0.15 LTS.
1 parent 207c4ad commit 5e90e51

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ Developers will need to ask the #android_chat channel in Slack for the treetrack
2828

2929
For development, select the build variant _dev_. This build variant is configured to allow trees to be added without a specific accuracy.
3030

31+
### ⚠️ JDK Compatibility for Robolectric Tests
32+
33+
Some test files — such as DashboardViewModelTest.kt and TreeTrackerDaoTest.kt — rely on the [Robolectric](https://robolectric.org/) testing framework, which is **not compatible with JDK 21**.
34+
35+
Since Android Studio ships with **JDK 21 by default**, these tests may fail to compile or run.
36+
To resolve this, change the **Gradle JDK** in Android Studio to **OpenJDK 17.0.15 LTS**, which is compatible with Robolectric.
37+
38+
You can download it from the [Microsoft OpenJDK site](https://learn.microsoft.com/en-us/java/openjdk/download).
39+
3140
 
3241

3342
## QC Deployment

0 commit comments

Comments
 (0)