[英]Android studio is not recognizing string or acceping it , just gives an error in gradle build everytime
final
is a reserved keyword in Java, you cannot use it as a variable name. final
是 Java 中的保留关键字,不能用作变量名。 Use finalString
or another descriptive name.使用
finalString
或其他描述性名称。
The term final
has some meaning in the programming language. final
一词在编程语言中具有一定的含义。 These words are known as KeyWords
.这些词被称为
KeyWords
。 You cannot use keywords as Identifiers
aka variable names.您不能将关键字用作
Identifiers
,也就是变量名。
So, use any other name instead.因此,请改用任何其他名称。 As @MartinFink suggests, use
正如@MartinFink 建议的那样,使用
String finalString;
Hope this helps.希望这可以帮助。 Feel free to ask for clarifications...
随时要求澄清...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.