我在使用getString
函数读取位于值文件夹中的字符串时遇到问题。我得到了一个错误:方法getString(int)未定义类型GamePlay
The method getString(int) is undefined for the type GamePlay
,因为我要调用的活动超出这个功能,不知何故该项目的结构是很奇怪的,是复杂的我。
我的项目是一个游戏,当你运行游戏运行SampleGame
:
public class SampleGame extends AndroidGame
它是从AndroidGame
具有以下声明扩展:
public abstract class AndroidGame extends Activity implements Game
而且SampleGame
执行SplashLoadingScreen
具有以下声明:
public class SplashLoadingScreen extends Screen
的SpalshLoadingScreen
终于加载了一些东西,然后调用GamePlay
public class GamePlay extends Screen
所以GamePlay
远未一个Activity
...
我如何使用,则getString(int)
功能?
给我们一些代码... – 2013-03-24 11:24:26
'GamePlay'或'Screen'是否具有'getString(int)'函数?我想不是,这就是错误的原因。 – BobTheBuilder 2013-03-24 11:27:38