开发者

local1 cannot be resolved or is not a field

开发者 https://www.devze.com 2023-02-11 09:03 出处:网络
I don not know what 开发者_如何学CI am doing I get this error on Main.1 local1 = new Main.1(this);

I don not know what 开发者_如何学CI am doing I get this error on Main.1 local1 = new Main.1(this); Multiple markers at this line

- local1 cannot be resolved or is not a field

- Syntax error on token ".1", . expected

- Syntax error on token ".1", delete this token

- The constructor Main(Main) is undefined

and then on localGridView.setOnItemClickListener(local1); I get this error local1 cannot be resolved to a variable

any suggestions?

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.widget.GridView;

public class Main extends Activity
{
  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    getWindow().setFlags(1024, 1024);
    setContentView(2130903042);
    setRequestedOrientation(1);
    GridView localGridView = (GridView)findViewById(2131034124);
    ImageAdapter localImageAdapter = new ImageAdapter(this);
    localGridView.setAdapter(localImageAdapter);
    Main.1 local1 = new Main.1(this);
    localGridView.setOnItemClickListener(local1);
  }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号