title: Android Studio Bug Says new Is Unresolved Reference
body: <p>I am trying to make an app for my friends and this error wont go away. I need to finish the app before march 6th and am not going to make it if i don't fix this error and finish the rest. Also, If there is a way to make nav_view into not a specific nav_ but every nav_ there is. So i can jump from nav_donate to nav_prayers or nav_donate to nav_events.</p>
  
  <p>errors are at the bottom of the page</p>
  
  <pre><code>package com.naifcenter.mohammad.naifcenter
  
  import android.app.FragmentManager
  import android.os.Bundle
  import android.support.design.widget.Snackbar
  import android.support.design.widget.NavigationView
  import android.support.v4.view.GravityCompat
  import android.support.v7.app.ActionBarDrawerToggle
  import android.support.v7.app.AppCompatActivity
  import android.view.Menu
  import android.view.MenuItem
  import kotlinx.android.synthetic.main.activity_home_page.*
  import kotlinx.android.synthetic.main.app_bar_home_page.*
  
  class HomePage : AppCompatActivity(), NavigationView.OnNavigationItemSelectedListener {
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_home_page)
          setSupportActionBar(toolbar)
  
          fab.setOnClickListener { view -&gt;
              Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                      .setAction("Action", null).show()
          }
  
          val toggle = ActionBarDrawerToggle(
                  this, drawer_layout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close)
          drawer_layout.addDrawerListener(toggle)
          toggle.syncState()
  
          nav_view.setNavigationItemSelectedListener(this)
      }
  
      override fun onBackPressed() {
          if (drawer_layout.isDrawerOpen(GravityCompat.START)) {
              drawer_layout.closeDrawer(GravityCompat.START)
          } else {
              super.onBackPressed()
          }
      }
  
      override fun onCreateOptionsMenu(menu: Menu): Boolean {
  
          menuInflater.inflate(R.menu.home_page, menu)
          return true
      }
  
      override fun onOptionsItemSelected(item: MenuItem): Boolean {
  
          when (item.itemId) {
              R.id.action_settings -&gt; return true
              else -&gt; return super.onOptionsItemSelected(item)
          }
      }
  
      override fun onNavigationItemSelected(item: MenuItem): Boolean {
  
          android.app.FragmentManager fragmentManager = getFragmentManager();
          when (item.itemId) {
              R.id.nav_prayer_rug -&gt; {
                  fragmentManager.beginTransaction()
                          .replace(R.id.nav_view
                          ,new prayertime())
                          .commit()  
  
              }
              R.id.nav_calendar -&gt; {
                  fragmentManager.beginTransaction()
                          .replace(R.id.nav_view
                                  ,new calendar())
                          .commit()
              }
              R.id.nav_donate -&gt; {
                  fragmentManager.beginTransaction()
                          .replace(R.id.nav_view
                                  ,new donate())
                          .commit()
              }
              R.id.nav_projects -&gt; {
                  fragmentManager.beginTransaction()
                          .replace(R.id.nav_view
                                  ,new projects())
                          .commit()
              }
              R.id.nav_social_media -&gt; {
                  fragmentManager.beginTransaction()
                          .replace(R.id.nav_view
                                  ,new socialmedia ())
                          .commit()
              }
              R.id.nav_bugs -&gt; {
                  fragmentManager.beginTransaction()
                          .replace(R.id.nav_view
                                  ,new bugs())
                          .commit()
              }
              R.id.nav_share -&gt; {
                  fragmentManager.beginTransaction()
                          .replace(R.id.nav_view
                                  ,new share())
                          .commit()
              }
              R.id.nav_send -&gt; {
                  fragmentManager.beginTransaction()
                          .replace(R.id.nav_view
                                  ,new contact())
                          .commit()
              }
          }
  
          drawer_layout.closeDrawer(GravityCompat.START)
          return true
      }
  }
  </code></pre>
  
  <p>current error is 
  Classifier 'FragmentManager' does not have a companion object, and thus must be initialized here
  (line 61)</p>
  
  <p>Unresolved reference: new
  (line 66, 74, 80, 86, 92, 98, 104, 110)</p>