每次我在项目面板上单击一个Java类文件时,该文件就会打开,并带有一些混乱的代码。
我有一个月前的备份,所以这里是一个例子。
旧Comment.java代码:
package tourisimo.com.licenta.dim.tourisimo_romania.DataType;
public class Comment {
private String id;
private String objectiveId;
private String userId;
private String parentId;
private String date;
private String text;
private int likes;
private int dislikes;
public Comment(String id, String objectiveId, String userId, String date, String parentId, String text, int likes, int dislikes) {
this.id = id;
this.objectiveId = objectiveId;
this.userId = userId;
this.date = date;
this.parentId = parentId;
this.text = text;
this.likes = likes;
this.dislikes = dislikes;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getDate() {
return date;
}
...
现在,如果我打开Comment.java文件,输出为:
<component name="libraryTable">
<library name="Gradle: androidx.lifecycle:lifecycle-viewmodel:2.0.0@aar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/7c34e5f4db0aa9910384a22c687e7922/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/7c34e5f4db0aa9910384a22c687e7922/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/androidx.lifecycle/lifecycle-viewmodel/2.0.0/41b56105d14b1151a963444875cab191271f43db/lifecycle-viewmodel-2.0.0-sources.jar!/" />
</SOURCES>
</library>
</component>
该文件在项目窗口中的显示也不同 https://i.stack.imgur.com/qj4q6.jpg
请帮助我!
谢谢。