Did you rebuild your app after migrating to XP7? The XSD schema was changed for XP7.0 but it’s located in the same place, so after you have rebuilt the app your lib dependencies should have been updated with XP7-versions and validation should work properly.
If that doesn’t work for you, you can add this to your build.gradle:
Thanks for your reply. I already had the compile dependency in my build.gradle and had run clean build from the terminal, but I realized that my Gradle settings in IntelliJ was using gradle from the wrong place and therefore were pointing at the old 6.15 libs. I had to configure IntelliJ to use Gradle from 'wrapper' task in Gradle build script: