Prakashvgr Prakashvgr - 1 year ago 174
React JSX Question

Window React Native Android development issue - java.lang.NullPointerException: entry

I'm new to React Native for Android development, please find the below further details to resolve my issue

  1. OS: Windows 7

  2. JDK & JRE: Version 8

  3. Node: v7.0.0

  4. NPM: 3.10.6

Whenever I try to run the command - 'react-native run-android' inside of my project root foleder gettting the following error, but meanwhile React Packager is opeing with - React Packager Ready. Not sure what whould be an issue,

$ react-native run-android
(node:6096) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
(node:6096) DeprecationWarning: Using Buffer without
will soon stop working. Use
new Buffer()
, or preferably

Starting JS server...

Running C:\Users******\AppData\Local\Android\sdk/platform-tools/adb -s emulator-5554 reverse tcp:8081 tcp:8081
Building and installing the app on the device (cd android && gradlew.bat installDebug...

java.lang.NullPointerException: entry

at org.gradle.api.internal.classpath.DefaultModuleRegistry.loadModuleProperties(
at org.gradle.api.internal.classpath.DefaultModuleRegistry.loadModule(
at org.gradle.api.internal.classpath.DefaultModuleRegistry.getModule(
at org.gradle.api.internal.classpath.DefaultModuleRegistry.module(
at org.gradle.api.internal.classpath.DefaultModuleRegistry.loadModule(
at org.gradle.api.internal.classpath.DefaultModuleRegistry.getModule(
at org.gradle.api.internal.DefaultClassPathProvider.findClassPath(
at org.gradle.api.internal.DefaultClassPathRegistry.getClassPath(
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(
at org.gradle.launcher.GradleMain.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.gradle.wrapper.BootstrapMainStarter.start(
at org.gradle.wrapper.WrapperExecutor.execute(
at org.gradle.wrapper.GradleWrapperMain.main(

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:

Downloaded and installed Chocolatey on windows machine then executed the following initial setup as per this document URL,

  1. choco install nodejs.install

  2. choco install python2

  3. npm install -g react-native-cli

  4. Download and installed Android SDK

  5. System Variable,
    a. Android HOME / JRE / JDK URL

AVD - Android Virtual Directory's are launching without any issue.

Answer Source

Hey finally i can able to find the route-cause and able to run the react native android app on windows machine. For my case while build the application, dependencies are getting downloaded from "https". If still anyone struggling on this issue find the below steps to resolve it,

Some Gradle files are missing So,

  1. Removed the .gradle directory (C:/Users/****/.gradle)

Modified secure to non-secure connection,

  1. Under application folder open the "android/build.gradle" file Comment the //jcenter() from buildscript

It should be look like this,

buildscript {
    repositories {
        jcenter { url "" }