onOptionsItemSelected(MenuItem item) opens wrong activity
<p>I have a menu on action bar that should open a specific activity on click, im calling the activity that i want to open (MaininsertActivity.java) but the view i get to see its activity_main2.xml</p>

<p><strong>MainActivity.java</strong></p>

<pre><code>    package com.example.bugdroid.trabalhoapp1;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.example.bugdroid.trabalhoapp1.modelo.Series;
import com.example.bugdroid.trabalhoapp1.modelo.Serie;

public class MainActivity extends AppCompatActivity {

    private ListView lv;

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

        lv = (ListView) findViewById(R.id.lista_series);

        Series Series = new Series();

        Serie exemplo = new Serie ("Thrones", "açao", 50, 10, 1900 );
        Series.getLista().add(exemplo);

        exemplo = new Serie("CSI", "Policial", 30, 20, 4);
        Series.getLista().add(exemplo);

        exemplo = new Serie("Flash", "aventura", 30, 20, 4);
        Series.getLista().add(exemplo);

        exemplo = new Serie("Vikings", "Historia", 3, 2, 4);
        Series.getLista().add(exemplo);

        ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, Series.getLista());

        lv.setAdapter(adapter);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = this.getMenuInflater();
        inflater.inflate(R.menu.menu, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {

        int id = item.getItemId();

        if(id == R.id.action_add) {
            Intent intent = new Intent(this, MaininsertActivity.class);
            startActivity(intent);
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}
</code></pre>

<p><strong>MaininsertActivity.java</strong></p>

<pre><code>    package com.example.bugdroid.trabalhoapp1;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.EditText;

public class MaininsertActivity extends AppCompatActivity {

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

        EditText et = (EditText) findViewById(R.id.nomeSerie);
        String nomedaserie = et.getText().toString();

        Intent i = new Intent(this, Main2Activity.class);
        i.putExtra("nomeSerie", nomedaserie);
        startActivity(i);

    }
}
</code></pre>

<p><strong>Main2Activity.java</strong></p>

<pre><code>    package com.example.bugdroid.trabalhoapp1;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ListView;

import com.example.bugdroid.trabalhoapp1.modelo.Serie;

import java.util.ArrayList;

public class Main2Activity extends AppCompatActivity {

    String uriString;

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

            Intent i = getIntent();
            uriString = i.getStringExtra("nomeSerie");
    }
}
</code></pre>

<p>This is my project tree:</p>

<p><a href="https://gyazo.com/e3cae13f1b62c2cb1442f377405ca55b" rel="nofollow">https://gyazo.com/e3cae13f1b62c2cb1442f377405ca55b</a></p>