title: Attempt to invoke virtual method 'void com.google.ar.sceneform.ux.ArFragment.setOnTapArPlaneListener on a null object reference
body: <p>Need Help to solve this nullpointerexception error!
  I've put a comment in Capital letters before the line at which I'm getting this error.</p>
  <pre><code> public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) 
  
              View view  = inflater.inflate(R.layout.fragment_object_placer, container, false);
  
              //Fetchting the instance of arFragment ID in XML
              arFragment = (ArFragment) getFragmentManager().findFragmentById(R.id.arFragment);
  
  
  
      &gt;NEXT LINE IS GIVING THE ERROR 
  
           arFragment.setOnTapArPlaneListener(((hitResult, plane, motionEvent) -&gt; {
              //TRIED TO RUN CODE COMMENTING CODE BELOW STILL STILL GETIING ERROR AT ABOVE LINE
              //Crating an Anchor on location where user has tapped
  //             Anchor anchor = hitResult.createAnchor();
  //             ModelRenderable.builder()
  //                    .setSource(getActivity(), Uri.parse(s))
  //                    .build()
  //                    .thenAccept(modelRenderable -&gt; addModelToScene(anchor, modelRenderable ));
              }));
  
  
  
          return view;
  
      }
  </code></pre>
  <blockquote>
  <p>Java null pointer exception
  java.lang.NullPointerException: Attempt to invoke virtual method
  'void com.google.ar.sceneform.ux.ArFragment.setOnTapArPlaneListener(com.google.ar.sceneform.ux.BaseArFragment$OnTapArPlaneListener)'
  on a null object reference
  at com.example.augmentedreality.Modules.ObjectPlacer.ObjectPlacer.onCreateView(ObjectPlacer.java:55)
  at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2600)
  at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:881)
  at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1238)
  at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1303)
  at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:439)
  at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManagerImpl.java:2079)
  at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1869)
  at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1824)
  at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManagerImpl.java:1727)
  at androidx.fragment.app.FragmentManagerImpl$2.run(FragmentManagerImpl.java:150)
  at android.os.Handler.handleCallback(Handler.java:883)
  at android.os.Handler.dispatchMessage(Handler.java:100)
  at android.os.Looper.loop(Looper.java:224)
  at android.app.ActivityThread.main(ActivityThread.java:7590)
  at java.lang.reflect.Method.invoke(Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)</p>
  </blockquote>