我正在使用 eclipse 构建一个 Android Twitter 应用程序我试图将值传递给变量 itemOfClothing、clothingEmotion 和“用户”,但 eclipse 甚至不允许我启动具有相同名称的变量,更不用说将值传递给它们了。
我收到以下错误:
Duplicate field TwitterApp.itemOfClothing
Duplicate field TwitterApp.clothingEmotion
Duplicate field TwitterApp.user
Syntax error on token ";", { expected after this token
Syntax error, insert "}" to complete Block
有人可以帮忙吗?
String itemOfClothing; //Item of clothing sending the message
String clothingEmotion; //Message of clothing
String user; //This comes from twitter sign in process
//将传递给变量的示例!
itemOfClothing = "pants";
clothingEmotion = "I'm feeling left in the dark";
user = "stuart";
试图将值传递给itemOfClothing
,clothingEmotion
和“用户”,但它不会让我。我知道这很愚蠢,但我不知道为什么。有人可以给我一个答案吗?
public static String MESSAGE = itemOfClothing +": " + clothingEmotion + "! #" + user + "EmotionalClothing";