[英]Found two getters or fields with conflicting case sensitivity for property: image
My logcat says that it "Found two getters or fields with conflicting case sensitivity for property : image". 我的logcat说它“发现两个具有属性区分大小写的getter或字段:image”。 Am using firebase database and I have no child named "image" rather I have a child name "Image".
我正在使用Firebase数据库,但是我没有名为“ image”的子级,而是有一个名为“ Image”的子级。
public class BlogCV {
public String Image;
public String Title;
public BlogCV() {
}
public BlogCV(String Image, String Title){
this.Title = Title;
this.Image = Image;
}
public String getImage() {
return Image;
}
public String getTitle() {
return Title;
}
} }
Your class should look like this: 您的课程应如下所示:
public class BlogCV {
public String image, title;
public BlogCV() {}
public BlogCV(String image, String title){
this.image = image;
this.title = title;
}
public String getImage() {
return image;
}
public String getTitle() {
return title;
}
}
Please see the fields which are now starting with lower cases. 请查看以小写字母开头的字段。
When using other libraries, make sure you follow the Java naming conventions. 使用其他库时,请确保遵循Java命名约定。 You should use the name of variables in
camelCase
starting from lowercase letter. 您应在
camelCase
使用小写字母开头的变量名称。
Your question is not clear. 您的问题不清楚。 But I believe it can be solved by using the name of the variable as
images
and title
. 但是我相信可以通过使用变量的名称作为
images
和title
来解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.