کد پیاچپی:
package com.example.kelidestan;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
public class Activity1 extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_activity1);
Button b = (Button) findViewById(R.id.Button1); ارور 1
@Override
public void onClick(View arg0) { ارور 2
startActivity(new Intent(Activity1.this, Activity2.class));
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity1, menu);
return true;
}
}
یکی از ارور ها پاک شد ولی ارور 1 و 2 همچنان پاورچا هست
ارور 1 :
Multiple markers at this line
- Button cannot be resolved to a type
- Syntax error, insert "}" to complete
MethodBody
- Button cannot be resolved to a type
- Button1 cannot be resolved or is not a
field
اروز 2 :
The method onClick(View) of type Activity1 must override or implement a supertype method
اقا ببخشید اینقدر سوال و مشکل برام اتفاق می افته اخه رشته من برنامه نویسی نیست .خیلی دوست دارم برنامه نویسی کنم لطفا راهنمایی و کمکم کنید تا بتون برنامه نویسی اندروید یاد بگیرم
چیکار کنم با ارور هام