Google에서이 자습서를 따라 Android Studio로 나만의 Android 앱을 만들려고합니다. 나는이 페이지의 4 단계를 수행 할 때하지만이 코드에서Android Studio 오류 : '보기'기호를 해결할 수 없습니다.
public class MainActivity extends ActionBarActivity {
/** Called when the user clicks the Send button */
public void sendMessage(View view) { <--- (This line ends up with the error)
// Do something in response to button
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
무슨 잘못 :
Cannot resolve symbol 'View'
이 내 코드가 순간에 모습입니다 : http://developer.android.com/training/basics/firstapp/starting-activity.html 안드로이드 Studio는이 오류와 함께 끝 ? 나는 자바에서 경험하지 못했고 다른 질문을 한 후에도 나는 여전히 올바른 해결책을 찾을 수 없었다.
도와 주셔서 감사합니다.
프로젝트를 청소하고 작동하는지 확인 – 2Dee
당신의 수입을 제시해주십시오. –
@ 2dee 수입 물을 어떻게 보여줄 수 있습니까? (이 프로그램/자바 입문) – Stefan