title: Execution failed for task ':app:compileDebugJavaWithJavac'. react-native
body: <p>Could not find the "expo" package in your project when configuring the packager
  Starting JS server...
  Building and installing the app on the device (cd android &amp;&amp; ./gradlew installDebug)...</p>
  
  <blockquote>
    <p>Task :app:compileDebugJavaWithJavac FAILED
    /media/rahul/OTHER FILES/mob/first/android/app/src/main/java/com/practice/MainApplication.java:5: error: cannot find symbol
    import com.facebook.react.ReactApplication;
                             ^
      symbol:   class ReactApplication
      location: package com.facebook.react
    /media/rahul/OTHER FILES/mob/first/android/app/src/main/java/com/practice/MainApplication.java:6: error: cannot find symbol
    import com.facebook.react.ReactNativeHost;
                             ^
      symbol:   class ReactNativeHost
      location: package com.facebook.react
    /media/rahul/OTHER FILES/mob/first/android/app/src/main/java/com/practice/MainApplication.java:14: error: cannot find symbol
    public class MainApplication extends Application implements ReactApplication {
                                                                ^
      symbol: class ReactApplication
    /media/rahul/OTHER FILES/mob/first/android/app/src/main/java/com/practice/MainApplication.java:16: error: cannot find symbol
      private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
                    ^
      symbol:   class ReactNativeHost
      location: class MainApplication
    /media/rahul/OTHER FILES/mob/first/android/app/src/main/java/com/practice/MainApplication.java:36: error: cannot find symbol
      public ReactNativeHost getReactNativeHost() {
             ^
      symbol:   class ReactNativeHost
      location: class MainApplication
    /media/rahul/OTHER FILES/mob/first/android/app/src/main/java/com/practice/MainActivity.java:5: error: MainActivity is not abstract and does not override abstract method getPackages() in ReactActivity
    public class MainActivity extends ReactActivity {
           ^
    /media/rahul/OTHER FILES/mob/first/android/app/src/main/java/com/practice/MainApplication.java:16: error: cannot find symbol
      private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
                                                           ^
      symbol:   class ReactNativeHost
      location: class MainApplication
    /media/rahul/OTHER FILES/mob/first/android/app/src/main/java/com/practice/MainApplication.java:35: error: method does not override or implement a method from a supertype
      @Override
      ^
    8 errors</p>
  </blockquote>
  
  <p>FAILURE: Build failed with an exception.</p>
  
  <ul>
  <li><p>What went wrong:
  Execution failed for task ':app:compileDebugJavaWithJavac'.</p>
  
  <blockquote>
    <p>Compilation failed; see the compiler error output for details.</p>
  </blockquote></li>
  <li><p>Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.</p></li>
  <li><p>Get more help at <a href="https://help.gradle.org" rel="noreferrer">https://help.gradle.org</a></p></li>
  </ul>
  
  <p>BUILD FAILED in 22s
  15 actionable tasks: 14 executed, 1 up-to-date
  Could not install the app on the device, read the error above for details.
  Make sure you have an Android emulator running or a device connected and have
  set up your Android development environment:
  <a href="https://facebook.github.io/react-native/docs/getting-started.html" rel="noreferrer">https://facebook.github.io/react-native/docs/getting-started.html</a></p>
  
  <p>i am setting up react-native project for first time please check if i am following steps correctly?
   1. create-react-native-app first
   2. npm run eject
   3. opening android studio and then simulator
   4. react-native run-android
  but getting error as above.</p>