Building for Android
Per Bothner
per@bothner.com
Tue Oct 18 15:25:21 GMT 2022
On 10/18/22 07:57, Panicz Maciej Godek via Kawa wrote:
> PARSE ERROR:
> unsupported class file version 61.0
> ...while parsing gnu/bytecode/Access.class
>
> So, what I suppose happens, is that the javac which builds Kawa emits byte
> code that is unsupported by dx.
Try specifying the --release to javac. This may be helpful:
https://stackoverflow.com/questions/43102787/what-is-the-release-flag-in-the-java-9-compiler
> I tried building Kawa having passed --with-java-source=7 to the 'configure'
> script, but that didn't help.
Yes, IIRC (if I recall correctly) that doesn't change teh options passed to javac.
You can pass the --target option to the kawa command when compiling Scheme to class files,
but that currently defaults to 52 (Java 8), which hopefuly dexer will handle.
> I also tried aliasing javac as javac -release 7, but it still seens to
> produce the class file version 61.0.
Hm. That is weird. You can try an exlicit 'javac --target 8' (say).
According to https://en.wikipedia.org/wiki/Java_version_history
class file version 61.0 is Java 17.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
More information about the Kawa
mailing list