Estou tentando compilar minha aplicação, mas dá a mensagem a seguir::
> cordova build android --debug
× Running command - failed!
[ERROR] An error occurred while running cordova build android --debug (exit code 1):
Running command: "C:\Program Files\nodejs\node.exe"
C:\apps\vovocooks-v10\hooks\after_prepare\010_add_platform_class.js C:\apps\vovocooks-v10
add to body class: platform-android
ANDROID_HOME=C:\Users\Ramos\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_144
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
:wrapper
BUILD SUCCESSFUL
Total time: 11.495 secs
Subproject Path: CordovaLib
null
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use
Task.doLast(Action) instead.
at build_455elprf89385ghd5v1ztjpv5.run(C:\apps\vovocooks-v10\platforms\android\build.gradle:139)
org.xwalk:xwalk_core_library:23+
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please
use TaskInputs.file(Object).skipWhenEmpty() instead.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_armv7DebugApkCopy'.
> Could not find com.android.support:support-v13:26.0.2.
Searched in the following locations:
file:/C:/Users/Ramos/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v13/26.0.2/support-v13-26.0.2.pom
file:/C:/Users/Ramos/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v13/26.0.2/support-v13-26.0.2.jar
file:/C:/apps/vovocooks-v10/platforms/android/sdk-manager/com/android/support/support-v13/26.0.2/support-v13-26.0.2.jar
Required by:
project :
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 14.626 secs
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_armv7DebugApkCopy'.
> Could not find com.android.support:support-v13:26.0.2.
Searched in the following locations:
file:/C:/Users/Ramos/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v13/26.0.2/support-v13-26.0.2.pom
file:/C:/Users/Ramos/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v13/26.0.2/support-v13-26.0.2.jar
file:/C:/apps/vovocooks-v10/platforms/android/sdk-manager/com/android/support/support-v13/26.0.2/support-v13-26.0.2.jar
Required by:
project :
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Já olhei as variáveis de ambiente, e parecem estar tudo certo, vejam:
O Android e o Java estão atualizados. O que pode ser?
Task.leftShift
eTaskInputs.source
foram descontinuados, use os métodosTask.doLast
,TaskInputs.file
. O métodoJavaCompile.setDependencyCacheDir()
foi removido da versão4.0
do Gradle.build.gradle
,C:\apps\vovocooks-v10\platforms\android\build.gradle:139
linha 139.Gradle
, sua versão dele é mais recente, então está te informando que os métodos foram descontinuados, então você terá que configurar o arquivobuild.gradle
do gradle