uidb-dev / react.cordova

best bundle to webApp mobile- react and cordova
67 stars 9 forks source link

build error #5

Closed abdellahFihri closed 5 years ago

abdellahFihri commented 5 years ago

hi, when i try to run reco build i get this error: reco start to build cordova

Checking Java JDK and Android SDK versions

ANDROID_SDK_ROOT=undefined (reactmmended setting) ANDROID_HOME=C:\Users\abdel\AppData\Local\Android\sdk (DEPRECATED)

reco-cli-build-cordova ERROR : Error: Command failed: cordova build Could not find an installed version of Gradle either in Android Studio, or on your system to install the gradle wrapper. Please include gradle in your path, or install Android Studio knowing that i installed all of them can you please help? thank you in advance

MickeyShalev commented 5 years ago

I happened to me as well after updating Android studio. I solved it by downloading Gradle manually and adding it to system variables and to system path (don't forger to restart your computer). You can find more information here : https://gradle.org/install/

image

orchuban commented 5 years ago

You have to set ANDROID_SDK_ROOT instead.

  1. Open control panel
  2. Then go to System
  3. Then go to Change Environment Variables of the User
  4. Then click create a new environment variables
  5. Create a new variable named ANDROID_SDK_HOME
  6. Set its value to your Android directory C:\Users...\AppData\Local\Android\sdk