question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't make build for android In Ionic

See original GitHub issue

Your Environment

  • Plugin version: 2.3.3
  • Platform: Android
  • OS version: 4.4.4 to 7.0.0
  • Device manufacturer and model: All devices
  • Cordova version (cordova -v): 8.0.0

Context

My issue is after adding this plugin to my Ionic project cannot make a build for the android device. So I created a new project and added this plugin to my project. Now I generated the build it shows the same exception but this time I did not add any code of this plugin.

Expected Behavior

Can able to make a build for android.

Actual Behavior

Cannot able to make a build for android.

Steps to Reproduce

  1. create a new Ionic project. start ionic <Project Name>
  2. Just add the plugin to the project using the below comment. $ ionic cordova plugin add cordova-plugin-mauron85-background-geolocation $ npm install --save @ionic-native/background-geolocation
  3. Now connect any android device. And run the following comment. ionic cordova run android --device 4.Now you will get the exception.

Debug logs

/home/hmspl/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/d22f6362e4ac053c8f6b4d99d0c72969/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.

/home/hmspl/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/d22f6362e4ac053c8f6b4d99d0c72969/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/ttcIndex not found.

/home/hmspl/TestProject2/platforms/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:94: error: resource android:attr/fontVariationSettings not found. /home/hmspl/TestProject2/platforms/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:94: 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 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 org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) 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) … 41 more Caused by: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logsfor 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) 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 4s at ChildProcess.whenDone (/home/hmspl/TestProject2/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23) at ChildProcess.emit (events.js:180:13) at maybeClose (internal/child_process.js:936:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5) (node:10036) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:10036) [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?

hmspl@BALA-LAPTOP:~/TestProject2$ ^C hmspl@BALA-LAPTOP:~/TestProject2$ B^C hmspl@BALA-LAPTOP:~/TestProject2$ ^C hmspl@BALA-LAPTOP:~/TestProject2$ ionic cordova run android --device Running app-scripts build: --platform android --target cordova [10:43:29] build dev started … [10:43:29] clean started … [10:43:29] clean finished in 4 ms [10:43:29] copy started … [10:43:29] deeplinks started … [10:43:29] deeplinks finished in 22 ms [10:43:29] transpile started … [10:43:33] transpile finished in 3.13 s [10:43:33] preprocess started … [10:43:33] preprocess finished in 1 ms [10:43:33] webpack started … [10:43:33] copy finished in 3.28 s [10:43:38] webpack finished in 5.85 s [10:43:38] 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. [10:43:39] sass finished in 1.13 s [10:43:39] postprocess started … [10:43:39] postprocess finished in 6 ms [10:43:39] lint started … [10:43:40] build dev finished in 10.23 s

cordova run android --device

You have been opted out of telemetry. To change this, run: cordova telemetry on. Android Studio project detected

ANDROID_HOME=/home/hmspl/Android/Sdk JAVA_HOME=/usr/lib/jvm/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_cuzl6il90i7xxre4h67pe49rx.run(/home/hmspl/TestProject2/platforms/android/app/build.gradle:144) :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:processDebugResources /home/hmspl/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/d22f6362e4ac053c8f6b4d99d0c72969/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.

/home/hmspl/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/d22f6362e4ac053c8f6b4d99d0c72969/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/ttcIndex not found.

/home/hmspl/TestProject2/platforms/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:94: error: resource android:attr/fontVariationSettings not found. /home/hmspl/TestProject2/platforms/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:94: 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.GeneratedMethodAccessor176.invoke(Unknown Source)

    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) … 47 more Caused by: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logsfor 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 1s FAILED 25 actionable tasks: 1 executed, 24 up-to-date [10:43:43] lint finished in 3.76 s (node:11008) UnhandledPromiseRejectionWarning: Error: /home/hmspl/TestProject2/platforms/android/gradlew: Command failed with exit code 1 Error output: /home/hmspl/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/d22f6362e4ac053c8f6b4d99d0c72969/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.

/home/hmspl/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/d22f6362e4ac053c8f6b4d99d0c72969/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/ttcIndex not found.

/home/hmspl/TestProject2/platforms/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:94: error: resource android:attr/fontVariationSettings not found. /home/hmspl/TestProject2/platforms/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:94: 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.GeneratedMethodAccessor176.invoke(Unknown Source) 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) … 47 more Caused by: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logsfor 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 1s at ChildProcess.whenDone (/home/hmspl/TestProject2/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23) at ChildProcess.emit (events.js:180:13) at maybeClose (internal/child_process.js:936:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5) (node:11008) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:11008) [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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:25 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
mmolhoekcommented, Mar 23, 2018

me too, simple to reproduce: ionic start (choose blank project and integrate with cordova), then (as explained in the ionic docs): ionic cordova plugin add cordova-plugin-mauron85-background-geolocation npm install --save @ionic-native/background-geolocation
ionic cordova build android

2reactions
mauron85commented, Mar 29, 2018

@giussa you just reminded me that in version 3.x there was exclusion group added for logback. I just did the same for 2.x. Please try 2.3.5 if it fixes your problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cant build android app - Ionic Forum
Cant build android app ... First try to completely rebuild your android build. ... P.s. You might have to update your gradle plugin...
Read more >
Unable to build android in IONIC 4 on MAC - Stack Overflow
Unable to create build for android from Ionic 4 solution. Command: ionic cordova build android Error: Checking Java JDK and Android SDK ...
Read more >
Why does my previously successful build from (some time ago ...
A common request about Ionic Appflow builds involves failures related to a build that was previously successful. For example: Why doesn't...
Read more >
How to create an Ionic 5 app - For beginners - Enappd
You also will need the latest browser for the development environment. To create production builds in Android and iOS, it would require Android...
Read more >
Generate an Android Bundle Build with Ionic - YouTube
If you want to build an Android bundle instead of the old APK format, following along this video for instructions that work with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found