title: warning: Cannot find annotation method 'value()' in type 'OnLifecycleEvent': class file for android.arch.lifecycle.OnLifecycleEvent not found
body: <p>I'm doing an android bridge to native react,
  of the following module: <a href="https://github.com/PierfrancescoSoffritti/android-youtube-player/" rel="nofollow noreferrer">https://github.com/PierfrancescoSoffritti/android-youtube-player/</a></p>
  
  <p>but from the following errors:</p>
  
  <pre><code>warning: Cannot find annotation method 'value()' in type 'OnLifecycleEvent': class file for android.arch.lifecycle.OnLifecycleEvent not found
  
  warning: unknown enum constant Event.ON_DESTROY reason: class file for android.arch.lifecycle.Lifecycle not found
  
  warning: Cannot find annotation method 'value()' in type 'OnLifecycleEvent'
  
  warning: unknown enum constant Event.ON_STOP
  
  error: cannot access LifecycleObserver
          youtubePlayerView.initialize(new YouTubePlayerInitListener() {
                           ^
    class file for android.arch.lifecycle.LifecycleObserver not found
  </code></pre>
  
  <p>This is the source code I'm using, I can not extend AppCompatActivity to use
  getLifecycle().addObserver(youtubePlayerView);</p>
  
  <pre><code>package com.uiyoutube;
  
  import android.support.annotation.NonNull;
  import android.view.ViewGroup;
  import android.widget.FrameLayout;
  
  import com.facebook.react.uimanager.ThemedReactContext;
  import com.facebook.react.uimanager.ViewGroupManager;
  import com.pierfrancescosoffritti.androidyoutubeplayer.player.YouTubePlayer;
  import com.pierfrancescosoffritti.androidyoutubeplayer.player.YouTubePlayerView;
  import com.pierfrancescosoffritti.androidyoutubeplayer.player.listeners.AbstractYouTubePlayerListener;
  import com.pierfrancescosoffritti.androidyoutubeplayer.player.listeners.YouTubePlayerInitListener;
  
  public class RNMaterialLetterIcon extends ViewGroupManager&lt;ViewGroup&gt; {
  
      public static final String REACT_CLASS = "RNMaterialLetterIcon";
  
      @Override
      public String getName() {
          return REACT_CLASS;
      }
  
      @Override
      protected FrameLayout createViewInstance(final ThemedReactContext reactContext) {
          //int randomId;
  
          //Random rand = new Random();
          //while (reactContext.getCurrentActivity().findViewById(randomId = rand.nextInt(Integer.MAX_VALUE) + 1) != null)
          ;
          //final int viewId = randomId;
  
          YouTubePlayerView youtubePlayerView = new YouTubePlayerView(reactContext);
          //youtubePlayerView.getPlayerUIController().showVideoTitle(true);
          //youtubePlayerView.getPlayerUIController().showYouTubeButton(false);
          //youtubePlayerView.getPlayerUIController().showFullscreenButton(false);
  
          //AppCompatActivity.getLifecycle().addObserver(youtubePlayerView);
  
          youtubePlayerView.initialize(new YouTubePlayerInitListener() {
              String videoId = "vs0-ix6UhwU";
  
              @Override
              public void onInitSuccess(@NonNull final YouTubePlayer initializedYouTubePlayer) {
                  initializedYouTubePlayer.addListener(new AbstractYouTubePlayerListener() {
                      @Override
                      public void onReady() {
                          initializedYouTubePlayer.loadVideo(videoId, 660);
                      }
  
                      @Override
                      public void onCurrentSecond(float second) {
                          if (second == 680) initializedYouTubePlayer.seekTo(660);
                      }
                  });
              }
          }, true);
  
          final FrameLayout frameLayout = new FrameLayout(reactContext);
          frameLayout.addView(youtubePlayerView);
  
          return frameLayout;
      }
  
  }
  </code></pre>
  
  <p>How can I solve?</p>