Skip to content
Advertisement

Android Room library error: Cannot find getter for field

I get this error but I couldn’t find any solution. I tried many things but still I’m getting this code.

My code is: https://justpaste.it/4di3y

The error:

error: Cannot find getter for field. ( private Long fie_id )

How I can fix it?

Advertisement

Answer

Instead of

public Long getId() {
    return fie_id;
}

public void setId(Long id) {
    this.fie_id = id;
}

Do

public Long getFie_id() {
    return fie_id;
}

public void setFie_id(Long fie_id) {
    this.fie_id = fie_id;
}
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement