Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Erro :app:preDebugBuild FAILED ao rodar ionic cordova build android

Estou com o seguinte erro ao rodar o comando ionic cordova build android

O que faço?

:app:preBuild UP-TO-DATE
:app:preDebugBuild FAILED

11 actionable tasks: 11 executed
FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not resolve com.android.support:support-v4:24.1.1+.
  Required by:
      project :app
   > Could not resolve com.android.support:support-v4:24.1.1+.
      > Failed to list versions for com.android.support:support-v4.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/com/android/support/support-v4/maven-metadata.xml.
            > Could not get resource 'https://jcenter.bintray.com/com/android/support/support-v4/maven-metadata.xml'.
               > Could not GET 'https://jcenter.bintray.com/com/android/support/support-v4/maven-metadata.xml'.
                  > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   > Could not resolve com.android.support:support-v4:24.1.1+.
      > Failed to list versions for com.android.support:support-v4.
         > Unable to load Maven meta-data from https://maven.google.com/com/android/support/support-v4/maven-metadata.xml.

Detalhe: O ionic serve --lab funciona

1 resposta
solução!

O problema era apenas questão de versão. Eu não me atentei no momento da criação do projeto e fiz com Ionic 4.