I have the an implementation in one of my build.gradle files of an Android app that I was using to check some data in the resource file.
new XmlParser().parse(stringsFile).string.find { [email protected] keyName }.text()
This seemed to have been working fine until I decided to upgrade the following
- To API Level 32 from 30
- Gradle from 6.5 to 7.3.
Now I am getting the error 'Cannot find Symbol XmlParser'.
There is no indication of this class being deprecated and I can find it in Groovy documentation. Basically I am trying to read a value from one of the resource xml files in one of the build steps.
1 Answer
Since groovy 4 the package for xml classes has been changed from groovy.util to groovy.xml.
So, now you have to import it differently
import groovy.xml.XmlParser