I suspect you have an older version of a .jar file in your userlib, probably from an upgrade or another module using the older version.
To solve this, open up your userlib folder and look for modules with the same name, but different version numbers. Move the versions with the lower version numbers out of the userlib and then try to build your application again. It should now build, but if not, you can restore the files you moved out.
There is also a userlib cleanup tool you can try if you get stuck.
https://github.com/cinaq/mendix-userlib-cleaner