title: Lottie Animation setAnimation() results IllegalStateException
body: <p>I want to check Lottie lib for both iOS and Android today, I made a simple indicator animation in after effect and export it to .json file and it just works on iOS. When I test the same file on Android I got the following error:</p>
  <pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.lottietest/com.test.lottietest.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.airbnb.lottie.LottieAnimationView.setAnimation(java.lang.String)' on a null object reference
  </code></pre>
  <p>here is my activity XML</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      tools:context=&quot;com.mtids.lottietest.MainActivity&quot;&gt;
  
      &lt;view
          class=&quot;com.airbnb.lottie.LottieAnimationView&quot;
          id=&quot;@+id/animationView&quot;
          android:layout_centerHorizontal=&quot;true&quot;
          android:layout_centerVertical=&quot;true&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot; /&gt;
  
      &lt;Button
          android:id=&quot;@+id/button2&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_alignParentStart=&quot;true&quot;
          android:layout_alignParentTop=&quot;true&quot;
          android:layout_marginStart=&quot;133dp&quot;
          android:layout_marginTop=&quot;20dp&quot;
          android:onClick=&quot;animate&quot;
          android:text=&quot;animate&quot; /&gt;
      
  &lt;/RelativeLayout&gt;
  </code></pre>
  <p>Activity code</p>
  <pre><code>public class MainActivity extends AppCompatActivity {
      LottieAnimationView anim;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          anim = (LottieAnimationView) findViewById(R.id.animationView);
          anim.setAnimation(&quot;indicator.json&quot;);
      }
  
      public void animate(View view) {
          anim.loop(true);
          anim.playAnimation();
      }
  }
  </code></pre>