2
respostas

Ionic - problema cordova

Quando dou o comando ' ionic cordova build android', estou com este problema...

C:\Projetos\smartMoney>ionic cordova build android
> ionic-app-scripts build --target cordova --platform android
[21:39:15]  ionic-app-scripts 3.2.2
[21:39:15]  build dev started ...
[21:39:16]  clean started ...
[21:39:16]  clean finished in 16 ms
[21:39:16]  copy started ...
[21:39:16]  deeplinks started ...
[21:39:16]  deeplinks finished in 41 ms
[21:39:16]  transpile started ...
[21:39:21]  transpile finished in 5.18 s
[21:39:21]  preprocess started ...
[21:39:21]  preprocess finished in 4 ms
[21:39:21]  webpack started ...
[21:39:22]  copy finished in 6.65 s
[21:39:33]  webpack finished in 12.07 s
[21:39:33]  sass started ...
[21:39:44]  sass finished in 11.40 s
[21:39:44]  postprocess started ...
[21:39:44]  postprocess finished in 29 ms
[21:39:44]  lint started ...
[21:39:45]  build dev finished in 29.05 s
[21:39:48]  lint finished in 3.96 s
> cordova build android

You have been opted out of telemetry. To change this, run: cordova telemetry on.
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Android\Sdk (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app
> Task :app:preBuild UP-TO-DATE
> Task :CordovaLib:preBuild UP-TO-DATE
> Task :CordovaLib:preDebugBuild UP-TO-DATE
> Task :CordovaLib:checkDebugManifest UP-TO-DATE
> Task :CordovaLib:processDebugManifest UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :CordovaLib:compileDebugAidl NO-SOURCE
> Task :app:compileDebugAidl NO-SOURCE
> Task :CordovaLib:packageDebugRenderscript NO-SOURCE
> Task :app:compileDebugRenderscript UP-TO-DATE
> Task :app:checkDebugManifest UP-TO-DATE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:prepareLintJar UP-TO-DATE
> Task :app:generateDebugSources UP-TO-DATE
> Task :CordovaLib:compileDebugRenderscript UP-TO-DATE
> Task :CordovaLib:generateDebugBuildConfig UP-TO-DATE
> Task :CordovaLib:generateDebugResValues UP-TO-DATE
> Task :CordovaLib:generateDebugResources UP-TO-DATE
> Task :CordovaLib:packageDebugResources UP-TO-DATE
> Task :CordovaLib:generateDebugRFile UP-TO-DATE
> Task :CordovaLib:prepareLintJar UP-TO-DATE
> Task :CordovaLib:generateDebugSources UP-TO-DATE
> Task :CordovaLib:javaPreCompileDebug UP-TO-DATE
> Task :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
> Task :CordovaLib:processDebugJavaRes NO-SOURCE
> Task :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:mainApkListPersistenceDebug UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE

> Task :app:mergeDebugResources FAILED
20 actionable tasks: 1 executed, 19 up-to-date
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Specified AAPT2 executable does not exist: C:\Users\Tati\.gradle\caches\transforms-1\files-1.1\aapt2-3.3.0-5013011-windows.jar\3c66372cb1d7633687670910253b3f87\aapt2-3.3.0-5013011-windows\aapt2.exe

* 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 9s
Error: C:\Projetos\smartMoney\platforms\android\gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Specified AAPT2 executable does not exist: C:\Users\Tati\.gradle\caches\transforms-1\files-1.1\aapt2-3.3.0-5013011-windows.jar\3c66372cb1d7633687670910253b3f87\aapt2-3.3.0-5013011-windows\aapt2.exe

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

        cordova build android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.
2 respostas

Boa noite, Tatiane! Como vai?

Dá uma olhada nesse link e veja se te ajuda! Qualquer coisa é só falar!

Grande abraço e bons estudos, minha aluna!

Olá, dei uma olhada, mas nao resolveu... acho que o meu problema está no Gradle,não é?