Apple M1 Gradle

I’ve been unsuccessfully trying to compile any code from the book on an M1 Macbook.

Has anyone had luck? And what is your Gradle configuration?

Make sure you have Gradle 7.0 installed. It has support for Apple M1.

As well as the ARM JDK, if you are using Android Studio, make sure you select Mac with Apple Chip and it will take care of all this for you.

I have upgraded the Gradle to 7 (7.1.2 to be precise).

I have yet to compile a single project provided by the course, it cannot compile due to this:

java.lang.NoClassDefFoundError: Could not initialize class

I assume that someone at the company has an M1 Mac. It would be extremely helpful to try fixing this since I’m stuck and cannot do even one assignment.

This error is related to the SDK/JDK/JRE environment, not the M1 chip (I have a MacBook Pro with M1/Apple Silicon).