39aldo39 / libdecsync

Other
28 stars 5 forks source link

SOLVED: Cannot compile with java-16, solved with java-8 #7

Closed 6-AND-9 closed 2 years ago

6-AND-9 commented 2 years ago

Hi there,

I am a Linux newbie, so please disregard the idiocy in my question/commentary. I use Manjaro and tried to install DecSync plugin for Evolution. However, I am unable to do so because my libdecsync is version 1.9.something instead of > 2.0.

So I decided to try and manually compile a higher version. This brought an issue with gradle, because of a function in settings.gradle, i.e. deprecated something enableFeaturePreview('GRADLE_METADATA'). Alright, I said, I'll just comment it out with double forward-slashes and be done with it.

However, there's another problem now, this time with Java. It says this:

FAILURE: Build failed with an exception.

* Where:
Settings file '/home/user/.../libdecsync/settings.gradle'

* What went wrong:
Could not compile settings file '/home/user/.../libdecsync/settings.gradle'.
> startup failed:
  General error during semantic analysis: Unsupported class file major version 60

  java.lang.IllegalArgumentException: Unsupported class file major version 60
...

Tried also deleting the line and saving an empty file (since it is the only line), to no avail. I also tried installing gradle5 instead of 7, but there were other errors there.

So basically I can't compile libdecsync > ver 2 because of gradle, and thus cannot use evolution-decsync because of old libdecsync.

What can I do to solve this weird issue!?

Thanks,

6-AND-9 commented 2 years ago

Solved the issue, thank God. Instead of using java 16, I changed the default to 8, with command: sudo archlinux-java set java-8-openjdk/jre. I successfully compiled both libdecsync and evolution-decsync.

Hope this will help anyone else stuck with this stupid issue.