I'm learning to program for Android on the Android Studio . When I start the application, the following message appears on the AVD " Unfortunalety , GuitarStoreV2 has stopped ."
Can anybody help me ? (Sorry if some stupid mistake , do not have much familiarity with the language , and excuse the error Portuguese , because I am Brazilian and I do not speak English fluently )
Grateful for the attention Mark Tonial
public class MainActivity extends AppCompatActivity {
Button btn_iniciaapp;
public void Inicia ()
{
Button btn_inciaapp = (Button) findViewById(R.id.btn_iniciaapp);
}
// Iniciando a tela de produtos
public void iniciaProd()
{
Intent ActivityProd = new Intent(this, ActivityProd.class);
startActivity(ActivityProd);
}
// Evento ao clicar no Botão
public void IniciaListener()
{
this.btn_iniciaapp.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
MainActivity.this.iniciaProd();
}
});
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.activity_main);
this.Inicia();
this.IniciaListener();
}
}