Failed to run "javac -version", make sure that you have a JDK version 8 installed.

0

Cześć,
w node.js w konsoli mam taki błąd: > Failed to run "javac -version", make sure that you have a JDK version 8 installed.
,mimo, że mam zainstalowaną javę jre1.8.0_202.

0

Teraz pokazuje: (na wpisanie cordova build)

Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\iktor\AppData\Local\Android\sdk (DEPRECATED)

ERROR: JAVA_HOME is set to an invalid directory: Path_to_jdk_bin

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
C:\Program Files\Android\Android Studio\gradle\gradle-5.1.1\bin\gradle: Command failed with exit code 1

0

Przepraszam, kliknąłem na wybierz plik, zamiast katalog, ale dalej pokazuje to samo, tylko zmieniło się

ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_212\bin

Tutaj cały komunikat:

Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\iktor\AppData\Local\Android\sdk (DEPRECATED)

ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_212\bin

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
C:\Program Files\Android\Android Studio\gradle\gradle-5.1.1\bin\gradle: Command failed with exit code 1

0

Jeszcze chwilę Ci zajmę :). Wpisałem "cordova build" i wyskoczyło mi: (daję całe, bo gubię się w tym i nie wiem co wysłać):

Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\iktor\AppData\Local\Android\sdk (DEPRECATED)

Welcome to Gradle 5.1.1!

Here are the highlights of this release:
 - Control which dependencies can be retrieved from which repositories
 - Production-ready configuration avoidance APIs

For more details see https://docs.gradle.org/5.1.1/release-notes.html

Terminate batch job (Y/N)? y

C:\Users\iktor\hello>cordova emulate android
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\iktor\AppData\Local\Android\sdk (DEPRECATED)
Starting a Gradle Daemon (subsequent builds will be faster)

BUILD SUCCESSFUL in 44s
1 actionable task: 1 executed
<-------------> 0% WAITING
> IDLE
Subproject Path: CordovaLib
Subproject Path: app
Downloading https://services.gradle.org/distributions/gradle-4.10.3-all.zip
................................................................................................................

Welcome to Gradle 4.10.3!

Here are the highlights of this release:
 - Incremental Java compilation by default
 - Periodic Gradle caches cleanup
 - Gradle Kotlin DSL 1.0-RC6
 - Nested included builds
 - SNAPSHOT plugin versions in the `plugins {}` block

For more details see https://docs.gradle.org/4.10.3/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :app
File C:\Users\iktor\.android\repositories.cfg could not be loaded.
Checking the license for package Android SDK Platform 28 in C:\Users\iktor\AppData\Local\Android\sdk\licenses
Warning: License for package Android SDK Platform 28 not accepted.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
     platforms;android-28 Android SDK Platform 28
  To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
  Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html

  Using Android SDK: C:\Users\iktor\AppData\Local\Android\sdk

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 5m 29s
C:\Users\iktor\hello\platforms\android\gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
     platforms;android-28 Android SDK Platform 28
  To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
  Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html

  Using Android SDK: C:\Users\iktor\AppData\Local\Android\sdk

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 5m 29s
0

Nie korzytam z Androida ale to:

Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-28 Android SDK Platform 28
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html

mówi, abyś zainstalował za pomocą Android Studio Managera brakujące komponenty i zaakceptował licencje.

1 użytkowników online, w tym zalogowanych: 0, gości: 1