title: intent in fragment keeps crashing problem with the manifest, android studio
body: <p>I'm getting the error </p>
  
  <blockquote>
    <p>android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.tulio.appkolev/com.example.tulio.appkolev.fragments.registerFragment}; have you declared this activity in your AndroidManifest.xml?</p>
  </blockquote>
  
  <p>After looking online and trying several pages I couldn't find a solution</p>
  
  <p>The basics are, I have this layout to login in an app at the end of the page I have a link to create an account. When clicked, the app crashes and shows me that error</p>
  
  <p>I'm sure the code is not up to standards</p>
  
  <p>main</p>
  
  <pre><code>package com.example.tulio.appkolev;
  
  
  public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener  {
  
  private final AppCompatActivity activity = MainActivity.this;
  
      private DrawerLayout drawer;
      private InputValidation inputValidation;
      private DatabaseHelper databaseHelper;
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
  
          Toolbar toolbar = findViewById(R.id.toolbar);
          setSupportActionBar(toolbar);
  
  
  
          drawer = findViewById(R.id.drawer_layout);
  
          NavigationView navigationView = findViewById(R.id.nav_view);
          navigationView.setNavigationItemSelectedListener(this);
  
          ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( this, drawer, toolbar,
                  R.string.navigation_drawer_close, R.string.navigation_drawer_close);
          drawer.addDrawerListener(toggle);
          toggle.syncState();
  
          if (savedInstanceState==null){
          getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new loginFragment()).commit();
          navigationView.setCheckedItem(R.id.account);
  
          }
      }
  
      @Override
      public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) {
          switch (menuItem.getItemId()){
              case R.id.settings:
                  getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new settingsFragment()).commit();
                  break;
              case R.id.account:
                  getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new loginFragment()).commit();
                  break;
              case R.id.assignments:
                  getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new assigmentsFragment()).commit();
                  break;
          }
          drawer.closeDrawer(GravityCompat.START);
          return true;
      }
  
      @Override
      public void onBackPressed(){
          if (drawer.isDrawerOpen(GravityCompat.START)){
              drawer.closeDrawer(GravityCompat.START);
          }else
          {
              super.onBackPressed();
          }
  
      }
  
      private void initObjects(){
          databaseHelper = new DatabaseHelper(activity);
          inputValidation = new InputValidation(activity);
      }
      }
  </code></pre>
  
  <p>login class</p>
  
  <pre><code>package com.example.tulio.appkolev.fragments;
  
  
  import com.example.tulio.appkolev.R;
  import com.example.tulio.appkolev.helper.InputValidation;
  import com.example.tulio.appkolev.sql.DatabaseHelper;
  
  
  public class loginFragment extends Fragment implements View.OnClickListener {
  
      private final Fragment fragment = loginFragment.this;
      private NestedScrollView nestedScrollView;
      private TextInputLayout input_email;
      private TextInputLayout input_password;
      private TextInputEditText input_edit_email;
      private TextInputEditText input_edit_password;
      private AppCompatButton button_login;
      private AppCompatTextView registerLink;
      private InputValidation inputValidation;
      private DatabaseHelper databaseHelper;
  
      @Nullable
      @Override
      public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
  
          View v = inflater.inflate(R.layout.fragment_login, container, false);
  
        //   initObjects();
  
          button_login = (AppCompatButton) v.findViewById(R.id.button_login);
          button_login.setOnClickListener(this);
          registerLink = (AppCompatTextView) v.findViewById(R.id.registerLink);
          registerLink.setOnClickListener(this);
          nestedScrollView = (NestedScrollView) v.findViewById(R.id.nestedScrollView);
          input_email = (TextInputLayout)v.findViewById(R.id.input_email);
          input_password = (TextInputLayout)v.findViewById(R.id.input_password);
          input_edit_email = (TextInputEditText) v.findViewById(R.id.input_edit_email);
          input_edit_password = (TextInputEditText) v.findViewById(R.id.input_edit_password);
  
          button_login = (AppCompatButton) v.findViewById(R.id.button_login);
          registerLink = (AppCompatTextView) v.findViewById(R.id.registerLink);
  
          button_login.setOnClickListener(this);
          registerLink.setOnClickListener(this);
  
          return v;
  
      }
  
      @Override
      public void onClick(View v) {
          switch (v.getId()) {
              case R.id.button_login:
                  verifyFromSQLite();
                  break;
              case R.id.registerLink:
                  Intent intentRegister = new Intent(getActivity().getApplicationContext(), registerFragment.class);
                  startActivity(intentRegister);
                  break;
          }
  
      }
  
    /*  private void initObjects(){
          databaseHelper = new DatabaseHelper(this);
          inputValidation = new InputValidation();
      }*/
  
          private void verifyFromSQLite(){
              if (!inputValidation.isInputEditTextFilled(input_edit_email, input_email, getString(R.string.error_message_email))) {
                  return;
              }
              if (!inputValidation.isInputEditTextEmail(input_edit_email,  input_email, getString(R.string.error_message_email))) {
                  return;
              }
              if (!inputValidation.isInputEditTextFilled(input_edit_password,  input_password, getString(R.string.error_message_email))) {
                  return;
              }
  
              if (databaseHelper.checkUser(input_edit_email.getText().toString().trim()
                      , input_edit_password.getText().toString().trim())) {
                  Intent accountsIntent = new Intent(getActivity().getApplication(), profileFragment.class);
                  accountsIntent.putExtra("EMAIL", input_edit_email.getText().toString().trim());
                  emptyInputEditText();
                  startActivity(accountsIntent);
              } else {
                 // Snackbar.make(nestedScrollView, getString(R.string.error_valid_email_password), Snackbar.LENGTH_LONG).show();
              }
          }
  
  
          private void emptyInputEditText(){
              input_edit_email.setText(null);
              input_edit_password.setText(null);
          }
  
      }
  
  </code></pre>
  
  <p>register class</p>
  
  <pre><code>package com.example.tulio.appkolev.fragments;
  
  import android.os.Bundle;
  import android.support.annotation.NonNull;
  import android.support.annotation.Nullable;
  import android.support.v4.app.Fragment;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  
  import com.example.tulio.appkolev.R;
  
  public class registerFragment extends Fragment {
      @Nullable
      @Override
      public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
          return inflater.inflate(R.layout.fragment_register, container, false);
      }
  
  }
  
  </code></pre>
  
  <p>manifest</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.tulio.appkolev"&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:roundIcon="@mipmap/ic_launcher_round"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
          &lt;activity android:name=".MainActivity"
              android:theme="@style/AppTheme.NoActionBar"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>i would like when clicked to take me to the register layout. please let me know all what can i improve</p>