tikxml: TypeAdapterNotFoundException

I am using this library with Retrofit2 and receiving error:

com.tickaroo.tikxml.TypeAdapterNotFoundException: No TypeAdapter for class App

This my XML:

<?xml version="1.0" encoding="UTF-8"?>

<app>
    <version>5</version>
</app>

this is my App class for which I am expecting the converter to convert XML to this App object:

@Xml(name = "app")
public class App {
    @PropertyElement
    public int version;
}

I am building the Retrofit TikXML converter factory like this:

new Retrofit.Builder()
.addConverterFactory(TikXmlConverterFactory.create());

Here is the interface for Retrofit that calls the URL to fetch and parse data. I am using with RxJava2:

@GET("/apps/config.xml")
    Single<App> getApp();

Am I missing something?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

This on android: annotationProcessor “com.tickaroo.tikxml:processor:$tikxml_version”

That looks like you forgot to add annotationProcessor to your gradle build file.