5

R.java问题(R cannot be resolved to a variable)

求助各路大神!!!!

package demo1;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;

public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.email);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.main, menu);
    return true;
}

public class TextView extends Activity{
public void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.email);
}
}

}
这问题该怎么解决。谢谢。
图片说明

查看全部
qq_35813802
polikesen
2017/12/07 07:30
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

23个回复