title: How to fix "unchecked call to 'attachView(V)' as a member of raw type 'BasePresenter'"?
body: <p>I have already looked up many answers here about this issue but for the life of me I can't seem to fix this problem on my end and I need some help.</p>
  
  <p><strong>BasePresenter:</strong></p>
  
  <pre><code>public abstract class BasePresenter&lt;V&gt; {
  
      private V mView;
  
      public void attachView(V view) { mView = view; }
      public void detachView() { mView = null; }
  
  }
  </code></pre>
  
  <p><strong>BaseFragment:</strong></p>
  
  <pre><code>public abstract class BaseFragment&lt;P extends BasePresenter&gt; extends Fragment {
  
      @Inject protected P mPresenter;
  
      @Override
      public void onResume() {
          super.onResume();
          mPresenter.attachView(this); // unchecked call to 'attachView(V)' as a member of raw type 'BasePresenter'
      }
  
      @Override
      public void onPause() {
          super.onPause();
          mPresenter.detachView();
      }
  
  }
  </code></pre>
  
  <p><strong>MyPresenter:</strong></p>
  
  <pre><code>public class MyPresenter extends BasePresenter&lt;MyPresenter.MyView&gt; {
  
      @Inject
      public MyPresenter() {}
  
      public interface MyView {}
  
  }
  </code></pre>
  
  <p><strong>MyFragment:</strong></p>
  
  <pre><code>public class MyFragment extends BaseFragment implements MyPresenter.MyView {}
  </code></pre>