title: Injecting Androidx Fragments using Dagger 2
body: <p>I want to inject my Androidx fragments using dagger 2. In my activity I have:</p>
  <pre><code>public class MainActivity extends AppCompatActivity implements HasSupportFragmentInjector
  {
      @Inject Repository repository;
      @Inject DispatchingAndroidInjector&lt;androidx.fragment.app.Fragment&gt; dispatchingAndroidInjector;
      @Override
      protected void onCreate(Bundle savedInstanceState)
      {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
         
      @Override
      public AndroidInjector&lt;androidx.fragment.app.Fragment&gt; supportFragmentInjector()
      {
          return dispatchingAndroidInjector;
      }
  }
  </code></pre>
  <p>the problem is when i want to build the project i get this error:</p>
  <pre><code>error: cannot find symbol class MapBuilder
  </code></pre>
  <p>and when i change <strong>androidx.fragment.app.Fragment</strong> to <strong>Fragment</strong> in DispatchingAndroidInjector i don't get this error any more.</p>