java在Eclipse中运行出现Syntax error: insert ";" to complete FieldDeclaration R.java
publicstaticfinalclassstring{publicstaticfinalintButton=0x7f0a0010;publicstaticfinali...
public static final class string {
public static final int Button=0x7f0a0010;
public static final int Next Activity Windows=0x7f0a0011;
/** Content description for the action bar "home" affordance. [CHAR LIMIT=NONE]
*/
public static final int Next Activity Windows=0x7f0a0011;
报告是这行出错:
Next为 Syntax error: insert ";" to complete FieldDeclaration;
Activity为:
Activity cannot be resolved to a type R.java
初学者求助大神 展开
public static final int Button=0x7f0a0010;
public static final int Next Activity Windows=0x7f0a0011;
/** Content description for the action bar "home" affordance. [CHAR LIMIT=NONE]
*/
public static final int Next Activity Windows=0x7f0a0011;
报告是这行出错:
Next为 Syntax error: insert ";" to complete FieldDeclaration;
Activity为:
Activity cannot be resolved to a type R.java
初学者求助大神 展开
1个回答
展开全部
public static final int Next Activity Windows=0x7f0a0011;
Java里面的变量名是不能包含空格的, 我觉得这行应该这样写:
public static final int Next_Activity_Windows=0x7f0a0011;
擦, 你这个是Android开发吧...R.java的错误应该是string.xml文件造成的吧.
我觉得是你string.xml里面有个key的name被你写成是"Next Activity Windows", 你试着改成Next_Activity_Windows试试?
Java里面的变量名是不能包含空格的, 我觉得这行应该这样写:
public static final int Next_Activity_Windows=0x7f0a0011;
擦, 你这个是Android开发吧...R.java的错误应该是string.xml文件造成的吧.
我觉得是你string.xml里面有个key的name被你写成是"Next Activity Windows", 你试着改成Next_Activity_Windows试试?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询