question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error with react-native run-android for gradle version gradle-2.4-all.zip

See original GitHub issue

Getting following error in every project that has distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip in android/gradle/wrapper/gradle-wrapper.properties. When i change the gradle version to gradle-2.2.1-all.zip, everything works fine.

$ react-native run-android
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug...
Exception in thread "main" java.lang.NullPointerException
    at org.gradle.wrapper.BootstrapMainStarter.findLauncherJar(BootstrapMainStarter.java:34)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:25)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
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

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
divyachandanacommented, Mar 25, 2017

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring root project ‘AwesomeProject’.

Could not resolve all dependencies for configuration ‘:classpath’. Could not resolve com.android.tools.build:gradle:2.2.3. Required by: :AwesomeProject:unspecified Could not resolve com.android.tools.build:gradle:2.2.3. Could not get resource ‘https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom’. Could not GET ‘https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom’. Connect to jcenter.bintray.com:443 [jcenter.bintray.com/108.168.243.150] failed: Connection timed out: connect

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 21 mins 38.128 secs

1reaction
rmansouricommented, Sep 27, 2017

i try this but not work

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting error while running `react-native run-android`
The Fix. The fix is simply to specify android core version via androidXCore in build.gradle buildscript { ext { buildToolsVersion = "29.0.3 ...
Read more >
Addressing common errors in React Native - LogRocket Blog
As a React Native developer, you're bound to run into some errors when developing ... list and check for the latest -all.zip Gradle...
Read more >
How to fix all build errors in react native(Android specific).
There are two ways to do this: Method 1:Clean Gradle. Run this code, making sure that Metro is not running: cd android gradlew...
Read more >
Speeding up your Build phase - React Native
To mitigate this performance hit, this page shares some suggestions on how to improve your build time. Build only one ABI during development...
Read more >
Different Ways to fix "Error running android: Gradle project ...
Different Ways to fix “Error running android: Gradle project sync failed” in Android Studio · Method 1: Restarting your project using Invalidate ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found