local1 cannot be resolved or is not a field
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);
}
}
精彩评论