title: AIDE Unknown type 'onNavigationItemSelectedListener' of 'android.support.design.widget.NavigationView'
body: <p>So i was trying to make a Drawer Navigation in AIDE but i keep getting these errors after starting to code the button functions or the fragments.</p>
  <p>For some reason i can't find and implement the onNavigationItemSelectedListener and it results to these two errors</p>
  <pre><code>MainActivity.java
  Unknown type 'onNavigationItemSelectedListener' of 'android.support.design.widget.
  NavigationView'
  
  Method 'android.support.design.widget.NavigationView.setNavigationItemSelected Lis
  tener(android.support.design.widget.Navigat
  ionView.OnNavigationItemSelectedListener)'
  in 'android.support.design.widget. NavigationView' can not be applied to
  '(com.apple.leapp.MainActivity)'
  </code></pre>
  <p>The MainActivity.java</p>
  <pre><code>package com.apple.leapp;
  
  import android.app.*;
  import android.os.*;
  import android.support.v7.app.*;
  import android.widget.*;
  import android.content.*;
  import android.support.v7.widget.*;
  import android.view.View;
  import android.support.v4.widget.*;
  import android.support.v4.view.*;
  import android.support.design.widget.NavigationView;
  import android.support.annotation.*;
  import android.view.*;
  
  public class MainActivity extends AppCompatActivity implements NavigationView.onNavigationItemSelectedListener
  {
      private DrawerLayout drawer;
      @Override
      protected void onCreate(Bundle savedInstanceState)
      {
          
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          setTitle(&quot;Main Page&quot;);
          
          android.support.v7.widget.Toolbar toolbar = (android.support.v7.widget.Toolbar) findViewById(R.id.toolbr);
          setSupportActionBar(toolbar);
          
          drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
          
          NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
          navigationView.bringToFront();
          navigationView.setNavigationItemSelectedListener(this);
          ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, toolbar,
          R.string.navigation_drawer_open, R.string.navigation_drawer_close);
          drawer.setDrawerListener(toggle);
          toggle.syncState();
          
          if(savedInstanceState == null){
          getSupportFragmentManager().beginTransaction().replace(R.id.fragment01,
               new IdiotFragment()).commit();
          navigationView.setCheckedItem(R.id.nav_rouge);}
      }
      @Nullable
      @Override
      public boolean onNavigationItemSelectedListener(@NonNull MenuItem item){
          switch (item.getItemId()){
              case R.id.nav_rouge:
              getSupportFragmentManager().beginTransaction().replace(R.id.fragment01,
                 new IdiotFragment()).commit();
              break;
              case R.id.nav_quoge:
              getSupportFragmentManager().beginTransaction().replace(R.id.fragment01,
                 new TicFragment()).commit();
              break;
          }
          drawer.closeDrawer(GravityCompat.START);
          return true;
      }
      
      @Override
      public void onBackPressed()
      {
          if (drawer.isDrawerOpen(GravityCompat.START)){
              drawer.closeDrawer(GravityCompat.START);
          } else {
          super.onBackPressed();
          }
      }
      
      
      
  }
  </code></pre>
  <p>This is my gradle</p>
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 27
      buildToolsVersion &quot;27.+&quot;
  
      defaultConfig {
          applicationId &quot;com.apple.leapp&quot;
          minSdkVersion 14
          targetSdkVersion 28
          versionCode 1
          versionName &quot;1.0&quot;
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile 'com.android.support:support-v4:27'
      compile 'com.android.support:design:+'
      compile 'com.android.support:appcompat-v7:27'
      compile fileTree(dir: 'libs', include: ['*.jar'])
      
  }
  </code></pre>
  <p>I tried searching around for solutions but i can't find one so i tried asking here.</p>