R无法解析变量为什么?

时间:2014-02-22 03:13:38

标签: eclipse android-resources

我有这个

public GamePanel(Context context, Game game,int ScreenWidth,int Screenheigt) {
    super(context);
    getHolder().addCallback(this);
    this.game = game;
    thread = new MainThread(getHolder(),this);
    background = new Background(BitmapFactory.decodeResource(getResources(), R.drawable.game_fon), ScreenWidth, this);
    BM = new Barriermanager(BitmapFactory.decodeResource(getResources(), R.drawable.barier), this);
    BM.setScreen(ScreenWidth, Screenheigt);
    ship = new Ship(BitmapFactory.decodeResource(getResources(), R.drawable.player), 100, 0, ScreenWidth, Screenheigt);
    coin = new Bonus(BitmapFactory.decodeResource(getResources(), R.drawable.bonus), -200,-200);
    ArrayList<Bitmap> animation = new ArrayList<Bitmap>();
    animation.add(BitmapFactory.decodeResource(getResources(), R.drawable.boom1));
    animation.add(BitmapFactory.decodeResource(getResources(), R.drawable.boom2));
    animation.add(BitmapFactory.decodeResource(getResources(), R.drawable.boom3));
    animation.add(BitmapFactory.decodeResource(getResources(), R.drawable.boom4));
    ship.setBoomAnimation(animation);

请帮忙! “R”无法解析为变量

0 个答案:

没有答案