Error Build IONIC 4

Preparing Firebase on Android
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\alan-\AppData\Local\Android\sdk (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘C:\Users\alan-\Desktop\Epacv1\platforms\android\app\build.gradle’ line: 20

  • What went wrong:
    A problem occurred evaluating project ‘:app’.

Failed to apply plugin [id ‘com.android.application’]
Could not create plugin of type ‘AppPlugin’.
Could not initialize class com.android.build.gradle.AppPlugin

  • 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 2s
C:\Users\alan-\Desktop\Epacv1\platforms\android\gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • Where:
    Build file ‘C:\Users\alan-\Desktop\Epacv1\platforms\android\app\build.gradle’ line: 20

  • What went wrong:
    A problem occurred evaluating project ‘:app’.

Failed to apply plugin [id ‘com.android.application’]
Could not create plugin of type ‘AppPlugin’.
Could not initialize class com.android.build.gradle.AppPlugin

  • 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 2s
[ERROR] An error occurred while running subprocess cordova.

    cordova build android --release exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.
1 Like

Alguien ya encontro solución?