Giter Site home page Giter Site logo

Comments (2)

breautek avatar breautek commented on May 27, 2024

JAVA_SDK error is due to Java 14 instead of Java 8.

On modern tooling, JDK 11 is the minimum required version, though JDK 17 would be recommended.

You don't have the ANDROID_HOME environment variable defined, therefore cordova has to guess where your android SDK is installed. It's usually better if this is explicitly defined. Based on your output it looks like it's located at C:\Users\ASUS\AppData\Local\Android\Sdk

If have an opened command prompt/powershell, they will need to be re-opened after changing environment variables. Environment variables are loaded only when they are opened and will not automatically receive environment variable updates.

There is a problem with cordova docs suggesting you to install the latest command-line tools, but the latest version requires JDK 17. So you either need to use JDK 17, or use command-line tools version 10.0, and uninstall any other versions that is installed.

If you have the Android SDK Tools (Obsolete) installed, then I'd also recommend uninstalling that. Those are the tools that only run on JDK 8 and they won't work with modern Android SDKs or run modern Android emulator images.

from cordova-android.

nishantshah977 avatar nishantshah977 commented on May 27, 2024

Thanks a lot it solved my issue.

Steps to reproduce

  1. Set ANDROID_HOME variable (In my case I've tried to save it but I've clicked cancel instead of OK)
  2. Download JAVA 17
  3. Add Gradle Path

from cordova-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.