I need help with CalendarQuickstart for java. I have followed the java quickstart steps except using gradle as we won't be using it.
When, I run the file it gives the following error:
Exception in thread "main" java.lang.NoSuchMethodError: 'boolean com.google.api.client.http.HttpTransport.isMtls()'
at com.google.api.services.calendar.Calendar$Builder.chooseEndpoint(Calendar.java:6974)
at com.google.api.services.calendar.Calendar$Builder.<init>(Calendar.java:7007)
at calendarquickstart.CalendarQuickstart.main(CalendarQuickstart.java:71)
C:\Users\User\AppData\Local\NetBeans\Cache\12.4\executor-snippets\run.xml:111: The following error occurred while executing this line:
C:\Users\User\AppData\Local\NetBeans\Cache\12.4\executor-snippets\run.xml:94: Java returned: 1
BUILD FAILED (total time: 2 seconds)
My line 71:
Calendar service = new Calendar.Builder(HTTP_TRANSPORT, JSON_FACTORY, getCredentials(HTTP_TRANSPORT))
.setApplicationName(APPLICATION_NAME)
.build();
Java Quickstart steps and source code: link
The libraries I've imported:
I'm using Netbeans 12.4 and Java JDK 16. The program runs on the other laptop without error. I also tried to look for answer online, they said something about changing POM.xml file but I could not find it anywhere. The java project was created with Ant not gradle or maven. Hope this info helps, and thank you for helping me as I've been stuck for hours with this error.