'Building ODK 1.16.4 failing on Android Studio

I have been trying to build this repository in Android Studio but to no avail https://github.com/getodk/collect/releases/tag/v1.16.4

Building with the gradle wrapper gradle-wrapper.properties gives me an "Unsupported class file major version 55" (using Gradle JVM Java 8 / Gradle wrapper : 4.7)

I change gradle JVM to Java 11 and wrapper to 4.9 then I get this error :

A problem occurred configuring project ':collect_app'.
java.lang.NullPointerException (no error message)

I use the latest Android studio Bumblebee

Anyone can help please?

Edit

After hours of retries, I finally managed to get it running, by installing an older version of android studio.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source