Estou implementando uma classe que implementa Parcelable
e estou utilizando a lib Parceler
, mas quando vou rodar o aplicativo aparece o seguinte erro:
Error:Execution failed for task ':app:javaPreCompileDebug'. Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor configuration. - parceler-1.0.3.jar (org.parceler:parceler:1.0.3) Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior. Note that this option is deprecated and will be removed in the future. See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.
Como o erro está mostrando é um problema na anotação que fiz na classe, mas não consigo entender o que está errado.
@org.parceler.Parcel
public class Carro
{
//Atributos da classe
private static final long serialVersionUID = 6601006766832473959L;
public long id;
public String tipo;
public String nome;
public String desc;
public String urlFoto;
public String urlInfo;
public String urlVideo;
public String urlLatitude;
public String urlLongitude;
@Override
public String toString() {
return "Carro{" + "nome-'" + nome + "/" + "}";
}
}
E no build.gradle
:
implementation 'org.parceler:parceler:1.0.3'
implementation 'org.parceler:parceler-api:1.0.3'
Se alguém puder me ajudar agradeço :)