Retrofit2 + SimpleXML in Kotlin: MethodException: Annotation must mark a set or get method
问题 I want to fetch XML data from API and map it to Kotlin model object by using Retrofit2 + SimpleXML in Kotlin. However, I got such as the following error message from SimpleXML. org.simpleframework.xml.core.MethodException: Annotation @org.simpleframework.xml.Element(data=false, name=, required=true, type=void) must mark a set or get method This is fetched XML data <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response> <result code="0">Success</result> <token>XXXXXXXXXXXXXXXXXXXX<