Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48977

Build fails with ionic cap run android -l --external

$
0
0

After updating to latest @ionic/cli version I started receiving this error after I try to do this command : ionic cap run android -l --external

FAILURE: Build failed with an exception.
[capacitor]
[capacitor] * Where:
[capacitor] Build file ‘E:\laragon\www\ProjekatA\frontend\android\app\build.gradle’ line: 1
[capacitor]
[capacitor] * What went wrong:
[capacitor] A problem occurred evaluating project ‘:app’.
[capacitor] > Failed to apply plugin ‘com.android.internal.application’.
[capacitor] > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
[capacitor] You can try some of the following options:
[capacitor] - changing the IDE settings.
[capacitor] - changing the JAVA_HOME environment variable.
[capacitor] - changing org.gradle.java.home in gradle.properties.

When I run command ,everything works fine, app gets served but after this line error is triggered:

capacitor.cmd run android --no-sync --target Pixel_3_API_30

Also this is line executed before error presents itself in terminal :

E:\laragon\www\ProjekatA\frontend\android>“C:\Program Files\Java\jre1.8.0_291/bin/java.exe” “-Xmx64m” “-Xms64m” “-Dorg.gradle.appname=gradlew” -classpath “E:\laragon\www\ProjekatA\frontend\android\gradle\wrapper\gradle-wrapper.jar” org.gradle.wrapper.GradleWrapperMain “assembleDebug”

I change gradle JDK to this :
image

But the error is still present.

Also this is what I have installed on system :
image

Maybe I need to upgrade this? How and to which version if that is the case.

Thanks in advance!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48977

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>