web-dev-qa-db-fra.com

Ionic App ne peut pas construire sur Android AAPT Error

Je crée une application ionique, l'émulation dans le navigateur fonctionne bien, mais dès que j'essaie de la construire sur Android, elle échoue. Cela ressemble à une erreur avec AATP, mais je ne peux vraiment pas comprendre pourquoi cela se produit ... Voici le journal des erreurs: 

Running app-scripts build: --platform Android --target cordova
[00:03:39]  build dev started ... 
[00:03:39]  clean started ... 
[00:03:39]  clean finished in 36 ms 
[00:03:39]  copy started ... 
[00:03:39]  deeplinks started ... 
[00:03:39]  deeplinks finished in 46 ms 
[00:03:39]  transpile started ... 
[00:03:43]  transpile finished in 4.22 s 
[00:03:43]  preprocess started ... 
[00:03:43]  preprocess finished in 1 ms 
[00:03:43]  webpack started ... 
[00:03:43]  copy finished in 4.49 s 
[00:03:50]  webpack finished in 6.46 s 
[00:03:50]  sass started ... 
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[00:03:51]  sass finished in 942 ms 
[00:03:51]  postprocess started ... 
[00:03:51]  postprocess finished in 14 ms 
[00:03:51]  lint started ... 
[00:03:51]  build dev finished in 11.87 s 
> cordova run Android
Android Studio project detected
Android_HOME=E:\AndroidSDK
Java_HOME=C:\Program Files\Java\jdk1.8.0_161
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
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_c6trj2zw0ratkgf1y8h09dz0v.run(C:\Users\Sebastian\Google Drive\GIT\myepa_mobile\platforms\Android\app\build.gradle:144)
[00:03:56]  tslint: C:/Users/Sebastian/Google Drive/GIT/myepa_mobile/src/pages/scanner/scanner.ts, line: 24 
            Property 'alertCtrl' is declared but never used. 

      L23:  private qrScanner: BarcodeScanner,
      L24:  private alertCtrl: AlertController,
      L25:  private storage: StorageProvider,

            Property 'storage' is declared but never used. 

      L24:  private alertCtrl: AlertController,
      L25:  private storage: StorageProvider,
      L26:  private api: ApiProvider,

            All imports are unused. 

       L2:  //import { NavController, NavParams } from 'ionic-angular';
       L3:  i[00:03:56]  tslint: C:/Users/Sebastian/Google Drive/GIT/myepa_mobile/src/pages/scanner/scanner.ts, line: 25 
[00:03:56]  tslint: ...bastian/Google Drive/GIT/myepa_mobile/src/pages/medicationplan/medicationplan.ts, line: 3 
[00:03:56]  tslint: C:/Users/Sebastian/Google Drive/GIT/myepa_mobile/src/pages/settings/settings.ts, line: 13 
[00:03:56]  tslint: C:/Users/Sebastian/Google Drive/GIT/myepa_mobile/src/pages/docs/docs.ts, line: 18 
[00:03:56]  tslint: C:/Users/Sebastian/Google Drive/GIT/myepa_mobile/src/pages/docs/docs.ts, line: 21 
mport {BarcodeScanner, BarcodeScannerOptions} from "@ionic-native/barcode-scanner";
       L4:  //import {StorageProvider} from "../../providers/storage/storage";

            Property 'navParams' is declared but never used. 

      L12:  constructor(private navCtrl: NavController,
      L13:              private navParams: NavParams,
      L14:              private storage: StorageProvider,

            Property 'navParams' is declared but never used. 

      L17:  constructor(private navCtrl: NavController,
      L18:              private navParams: NavParams,
      L19:              private api: ApiProvider,

            Property 'zone' is declared but never used. 

      L20:            private events: Events,
      L21:            private zone: NgZone) {
      L22:  events.subscribe("res:update", () =>{

[00:03:56]  lint finished in 5.12 s 
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:platformAttrExtractor UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:javaPreCompileDebug UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugAidl UP-TO-DATE
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:splitsDiscoveryTaskDebug UP-TO-DATE
:app:processDebugResourcesC:\Users\Sebastian\.gradle\caches\transforms-1\files-1.1\support-compat-28.0.0-alpha1.aar\87f8372badb42114e191aeebff73693e\res\values\values.xml:20:5-70: AAPT: error: resource Android:attr/fontVariationSettings not found.

C:\Users\Sebastian\.gradle\caches\transforms-1\files-1.1\support-compat-28.0.0-alpha1.aar\87f8372badb42114e191aeebff73693e\res\values\values.xml:20:5-70: AAPT: error: resource Android:attr/ttcIndex not found.

C:\Users\Sebastian\Google Drive\GIT\myepa_mobile\platforms\Android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:141: error: resource Android:attr/fontVariationSettings not found.
C:\Users\Sebastian\Google Drive\GIT\myepa_mobile\platforms\Android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:141: error: resource Android:attr/ttcIndex not found.
error: failed linking references.

Failed to execute aapt
com.Android.ide.common.process.ProcessException: Failed to execute aapt
    at com.Android.builder.core.AndroidBuilder.processResources(AndroidBuilder.Java:796)
    at com.Android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.Java:551)
    at com.Android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.Java:285)
    at com.Android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.Java:109)
    at Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.Java:62)
    at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:43)
    at Java.lang.reflect.Method.invoke(Method.Java:498)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.Java:73)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.Java:173)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.Java:134)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.Java:121)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.Java:122)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.Java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.Java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.Java:197)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.Java:107)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.Java:111)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.Java:92)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.Java:70)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.Java:63)
    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.Java:54)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.Java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.Java:88)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.Java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.Java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.Java:54)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.Java:43)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.Java:34)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.Java:248) FAILED
25 actionable tasks: 1 executed, 24 up-to-date

    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.Java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.Java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.Java:197)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.Java:107)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.Java:241)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.Java:230)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.Java:124)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.Java:80)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.Java:105)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.Java:99)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.Java:625)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.Java:580)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.Java:99)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.Java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.Java:46)
    at Java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.Java:1149)
    at Java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.Java:624)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.Java:55)
    at Java.lang.Thread.run(Thread.Java:748)
Caused by: Java.util.concurrent.ExecutionException: Java.util.concurrent.ExecutionException: com.Android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
    at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.Java:503)
    at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.Java:482)
    at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.Java:79)
    at com.Android.builder.core.AndroidBuilder.processResources(AndroidBuilder.Java:794)
    ... 48 more
Caused by: Java.util.concurrent.ExecutionException: com.Android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
    at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.Java:503)
    at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.Java:462)
    at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.Java:79)
    at com.Android.builder.internal.aapt.v2.QueueableAapt2.lambda$makeValidatedPackage$1(QueueableAapt2.Java:179)
    at Java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.Java:1149)
    at Java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.Java:624)
    ... 1 more
Caused by: com.Android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
    at com.Android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.Java:454)
    at com.Android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.Java:411)
    at com.Android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.Java:332)
    at com.Android.utils.GrabProcessOutput$1.run(GrabProcessOutput.Java:104)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
(node:14708) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command failed with exit code 1 Error output:
C:\Users\Sebastian\.gradle\caches\transforms-1\files-1.1\support-compat-28.0.0-alpha1.aar\87f8372badb42114e191aeebff73693e\res\values\values.xml:20:5-70: AAPT: error: resource Android:attr/fontVariationSettings not found.

C:\Users\Sebastian\.gradle\caches\transforms-1\files-1.1\support-compat-28.0.0-alpha1.aar\87f8372badb42114e191aeebff73693e\res\values\values.xml:20:5-70: AAPT: error: resource Android:attr/ttcIndex not found.

C:\Users\Sebastian\Google Drive\GIT\myepa_mobile\platforms\Android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:141: error: resource Android:attr/fontVariationSettings not found.
C:\Users\Sebastian\Google Drive\GIT\myepa_mobile\platforms\Android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:141: error: resource Android:attr/ttcIndex not found.
error: failed linking references.

Failed to execute aapt
com.Android.ide.common.process.ProcessException: Failed to execute aapt
    at com.Android.builder.core.AndroidBuilder.processResources(AndroidBuilder.Java:796)
    at com.Android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.Java:551)
    at com.Android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.Java:285)
    at com.Android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.Java:109)
    at Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.Java:62)
    at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:43)
    at Java.lang.reflect.Method.invoke(Method.Java:498)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.Java:73)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.Java:173)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.Java:134)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.Java:121)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.Java:122)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.Java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.Java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.Java:197)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.Java:107)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.Java:111)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.Java:92)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.Java:70)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.Java:63)
    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.Java:54)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.Java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.Java:88)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.Java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.Java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.Java:54)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.Java:43)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.Java:34)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.Java:248)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.Java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.Java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.Java:197)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.Java:107)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.Java:241)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.Java:230)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.Java:124)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.Java:80)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.Java:105)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.Java:99)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.Java:625)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.Java:580)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.Java:99)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.Java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.Java:46)
    at Java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.Java:1149)
    at Java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.Java:624)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.Java:55)
    at Java.lang.Thread.run(Thread.Java:748)
Caused by: Java.util.concurrent.ExecutionException: Java.util.concurrent.ExecutionException: com.Android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
    at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.Java:503)
    at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.Java:482)
    at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.Java:79)
    at com.Android.builder.core.AndroidBuilder.processResources(AndroidBuilder.Java:794)
    ... 48 more
Caused by: Java.util.concurrent.ExecutionException: com.Android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
    at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.Java:503)
    at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.Java:462)
    at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.Java:79)
    at com.Android.builder.internal.aapt.v2.QueueableAapt2.lambda$makeValidatedPackage$1(QueueableAapt2.Java:179)
    at Java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.Java:1149)
    at Java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.Java:624)
    ... 1 more
Caused by: com.Android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
    at com.Android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.Java:454)
    at com.Android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.Java:411)
    at com.Android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.Java:332)
    at com.Android.utils.GrabProcessOutput$1.run(GrabProcessOutput.Java:104)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
(node:14708) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

[OK] Your app has been deployed.
     Did you know you can live-reload changes from your app with --livereload?

Qu'est-ce qui s'est passé, je ne peux vraiment pas m'exprimer, car au début de la journée, la création de l'application a bien fonctionné ... 

Mon information sur l'environnement du projet ionique:

cli packages: (C:\Users\Sebastian\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : Android 7.0.0 browser 5.0.3
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v8.9.4
    npm               : 5.6.0
    OS                : Windows 10

Environment Variables:

    Android_HOME : E:\AndroidSDK

Misc:

    backend : pro

EDIT: J'ai résolu le problème en désinstallant tous les plugins et en les installant un à un. Le problème était le plugin BarcodeScanner ( ici ). La modification de la valeur compile 'com.Android.support:support-v4:+' en compile 'com.Android.support:support-v4:23+' dans le fichier starter-barcodescanner.gradle sous plates-formes/Android/phonegap-plugin-barcodescanner a résolu le problème.

17
Klitz

Ceci a été répondu pour moi par @avmatte Ici :

2
Chris Ritten

Certains plugins peuvent rencontrer des incompatibilités dues aux nouvelles mises à jour des bibliothèques de support Android, comme expliqué dans d'autres réponses ici.

La solution la plus simple consiste à installer le plug-in "cordova-Android-support-gradle-release". Ce plugin aligne automatiquement la version du plugin qui s'est écrasé et vous pouvez continuer à utiliser votre plugin.

De plus, ce correctif est persistant par rapport à la modification manuelle de la version directement dans le plugin. 

cordova plugin add cordova-Android-support-gradle-release --fetch  

Vous pouvez également consulter la documentation et tout autre problème connexe ici

10
Andrew Radulescu

Sur le noyau Cordova, ce plugin l’a corrigé.

https://github.com/dpa99c/cordova-Android-support-gradle-release

1
jorrit

J'ai trouvé ma réponse ici:

Erreur de construction -Ionic Cordova échoue pour Android

En outre, le mien nécessitait un correctif similaire à celui décrit ci-dessus, mais uniquement dans le plugin de.appplant.cordova.plugin.local-notification. J'ai remplacé «com.Android.support:support-v4:+» par «com.Android.support:support-v4:23+», puis j'ai supprimé et ajouté la plate-forme Android. Cependant, j'avais une attache supplémentaire '}' dans mon build-extras.gradle qui devait également être supprimée.

0
Mark A. Rupert

Je peux vérifier que le plug-in Gradle l'a corrigé . J'ai essayé les numéros de version de support avant, mais le plug-in était la seule solution qui résolve le problème après trois semaines de débogage!

0
Rob