title: Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
body: <p>I have react native version 0.42.0. My project was working fine with this.</p>
  
  <p>Recently I upgraded to react-native version 0.43.1. and now when I do </p>
  
  <pre><code>react-native run-android
  </code></pre>
  
  <p>I am stuck with the error.</p>
  
  <pre><code>JS server already running.
  Building and installing the app on the device (cd android &amp;&amp; ./gradlew installDebug)...
  Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
  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:
  https://facebook.github.io/react-native/docs/android-setup.html
  </code></pre>
  
  <p>I have followed the instruction for upgrading from
  <a href="https://facebook.github.io/react-native/docs/upgrading.html" rel="noreferrer">https://facebook.github.io/react-native/docs/upgrading.html</a></p>
  
  <p>I googled the issue. Gone through the following links none of it worked for me.</p>
  
  <ol>
  <li><p><a href="https://stackoverflow.com/questions/29805622/could-not-find-or-load-main-class-org-gradle-wrapper-gradlewrappermain">Could not find or load main class org.gradle.wrapper.GradleWrapperMain</a></p></li>
  <li><p><a href="https://stackoverflow.com/questions/38508014/error-could-not-find-or-load-main-class-org-gradle-wrapper-gradlewrappermain">Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain</a> </p></li>
  <li><p><a href="https://stackoverflow.com/questions/25769536/how-when-to-generate-gradle-wrapper-files">How/when to generate Gradle wrapper files?</a></p></li>
  </ol>
  
  <p>any kind of help/guidance will be helpfull for me. </p>