Hello,
I have an ionic v3 application and I am trying to implement firebase analytics to it.
I have installed the plugin but I cannot seem to get it to work. I've tried adding both cordova-android-play-services-gradle-release
and/or cordova-android-firebase-gradle-release
, with no luck.
I have installed this plugin and npm install @ionic-native/firebase@4
as stated on the v3 ionic docs. On Friday, after a long time struggling, I had managed to make the plugin work, and even logged some events on my firebase account, but this morning, without me having touched the code or anything at all, it wasn't working.
If I remove the plugin the application runs smoothly.
What I am doing is run ionic cordova run android -l
and I get the following error:
Error
[cordova] publishNonDefault is deprecated and has no effect anymore. All variants are now published.
[cordova] +-----------------------------------------------------------------
[cordova] | cordova-android-support-gradle-release: 27.+
[cordova] +-----------------------------------------------------------------
[cordova] Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
[cordova] The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
[cordova] at build_cxskoufx39z4y9wjava9sa375.run(C:\Users\User\Desktop\apps\myApp\myApp-app\platforms\android\app\build.gradle:146)
[cordova] registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
[cordova] registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
[cordova] :CordovaLib:preBuild UP-TO-DATE
[cordova] :CordovaLib:preDebugBuild UP-TO-DATE
[cordova] :CordovaLib:compileDebugAidl
[cordova] :CordovaLib:compileDebugRenderscript
[cordova] :CordovaLib:checkDebugManifest
[cordova] :CordovaLib:generateDebugBuildConfig
[cordova] :CordovaLib:prepareLintJar
[cordova] :CordovaLib:generateDebugResValues
[cordova] :CordovaLib:generateDebugResources
[cordova] :CordovaLib:packageDebugResources
[cordova] :CordovaLib:platformAttrExtractor
[cordova] :CordovaLib:processDebugManifest
[cordova] :CordovaLib:javaPreCompileDebug
[cordova] :CordovaLib:processDebugJavaRes NO-SOURCE
[cordova] :app:preBuild UP-TO-DATE
[cordova] :app:preDebugBuild
[cordova] :app:compileDebugAidl
[cordova] :CordovaLib:packageDebugRenderscript NO-SOURCE
[cordova] :app:compileDebugRenderscript
[cordova] :app:checkDebugManifest
[cordova] :app:generateDebugBuildConfig
[cordova] :app:prepareLintJar
[cordova] :CordovaLib:mergeDebugShaders
[cordova] :CordovaLib:compileDebugShaders
[cordova] :CordovaLib:generateDebugAssets
[cordova] :CordovaLib:mergeDebugAssets
[cordova] :app:mergeDebugShaders
[cordova] :app:compileDebugShaders
[cordova] :app:generateDebugAssets
[cordova] :app:mergeDebugAssets
[cordova] :app:processDebugGoogleServices
[cordova] Parsing json file: C:\Users\User\Desktop\apps\myApp\myApp-app\platforms\android\app\google-services.json
[cordova] :app:createDebugCompatibleScreenManifests
[cordova] :app:processDebugManifest
[cordova] C:\Users\User\Desktop\apps\myApp\myApp-app\platforms\android\app\src\main\AndroidManifest.xml:24:9-31:50 Warning:
[cordova] activity#com.google.firebase.auth.internal.FederatedSignInActivity@android:launchMode was tagged at AndroidManifest.xml:24 to replace other declarations but no other declaration present
[cordova] :app:fabricGenerateResourcesDebug
[cordova] :app:generateDebugResValues
[cordova] :app:generateDebugResources
[cordova] :app:mergeDebugResources
[cordova] :app:splitsDiscoveryTaskDebug
[cordova] :app:compileDebugNdk NO-SOURCE
[cordova] :CordovaLib:compileDebugNdk NO-SOURCE
[cordova] :CordovaLib:mergeDebugJniLibFolders
[cordova] :CordovaLib:processDebugResources
[cordova] :CordovaLib:generateDebugSources
[cordova] Note: Some input files use or override a deprecated API.
[cordova] Note: Recompile with -Xlint:deprecation for details.
[cordova] :CordovaLib:compileDebugJavaWithJavac
[cordova] :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
[cordova] C:\Users\User\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\5d7cee76bb1a64a7793c2fc432538f53\res\values\values.xml:251:5-69: AAPT: error: resource android:attr/fontVariationSettings not found.
[cordova]
[cordova] C:\Users\User\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\5d7cee76bb1a64a7793c2fc432538f53\res\values\values.xml:251:5-69: AAPT: error: resource android:attr/ttcIndex not found.
[cordova]
[cordova] C:\Users\User\Desktop\apps\myApp\myApp-app\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:266: error: resource android:attr/fontVariationSettings not found.
[cordova] C:\Users\User\Desktop\apps\myApp\myApp-app\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:266: error: resource android:attr/ttcIndex not found.
[cordova] error: failed linking references.
[cordova]
[cordova] :app:processDebugResources FAILED
[cordova] 34 actionable tasks: 34 executed
[cordova] Failed to execute aapt
[cordova] com.android.ide.common.process.ProcessException: Failed to execute aapt
[cordova] at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796)
[cordova] at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551)
[cordova] at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285)
[cordova] at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109)
[cordova] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[cordova] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[cordova] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[cordova] at java.lang.reflect.Method.invoke(Method.java:498)
[cordova] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
[cordova] at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
[cordova] at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
[cordova] at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
[cordova] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
[cordova] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
[cordova] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
[cordova] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
[cordova] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
[cordova] at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
[cordova] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
[cordova] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
[cordova] at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
[cordova] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
[cordova] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
[cordova] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
[cordova] at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
[cordova] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
[cordova] at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
[cordova] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[cordova] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[cordova] at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
[cordova] at java.lang.Thread.run(Thread.java:748)
[cordova] Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
[cordova] at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
[cordova] at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482)
[cordova] at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
[cordova] at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:794)
[cordova] ... 48 more
[cordova] Caused by: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
[cordova] at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
[cordova] at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:462)
[cordova] at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
[cordova] at com.android.builder.internal.aapt.v2.QueueableAapt2.lambda$makeValidatedPackage$1(QueueableAapt2.java:179)
[cordova] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[cordova] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[cordova] ... 1 more
[cordova] Caused by: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
[cordova] at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:454)
[cordova] at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:411)
[cordova] at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:332)
[cordova] at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:104)
[cordova]
[cordova] FAILURE: Build failed with an exception.
[cordova]
[cordova] * What went wrong:
[cordova] Execution failed for task ':app:processDebugResources'.
[cordova] > Failed to execute aapt
[cordova]
[cordova] * Try:
[cordova] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[cordova]
[cordova] * Get more help at https://help.gradle.org
[cordova]
[cordova] BUILD FAILED in 1m 44s
[cordova] cmd: Command failed with exit code 1 Error output:
[cordova] Note: Some input files use or override a deprecated API.
[cordova] Note: Recompile with -Xlint:deprecation for details.
[cordova] C:\Users\User\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\5d7cee76bb1a64a7793c2fc432538f53\res\values\values.xml:251:5-69: AAPT: error: resource android:attr/fontVariationSettings not found.
[cordova]
[cordova] C:\Users\User\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\5d7cee76bb1a64a7793c2fc432538f53\res\values\values.xml:251:5-69: AAPT: error: resource android:attr/ttcIndex not found.
[cordova]
[cordova] C:\Users\User\Desktop\apps\myApp\myApp-app\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:266: error: resource android:attr/fontVariationSettings not found.
[cordova] C:\Users\User\Desktop\apps\myApp\myApp-app\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:266: error: resource android:attr/ttcIndex not found.
[cordova] error: failed linking references.
[cordova]
[cordova] Failed to execute aapt
[cordova] com.android.ide.common.process.ProcessException: Failed to execute aapt
[cordova] at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796)
[cordova] at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551)
[cordova] at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285)
[cordova] at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109)
[cordova] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[cordova] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[cordova] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[cordova] at java.lang.reflect.Method.invoke(Method.java:498)
[cordova] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
[cordova] at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
[cordova] at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
[cordova] at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
[cordova] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
[cordova] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
[cordova] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
[cordova] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
[cordova] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
[cordova] at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
[cordova] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
[cordova] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
[cordova] at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
[cordova] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
[cordova] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
[cordova] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
[cordova] at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
[cordova] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
[cordova] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
[cordova] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
[cordova] at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
[cordova] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[cordova] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[cordova] at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
[cordova] at java.lang.Thread.run(Thread.java:748)
[cordova] Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
[cordova] at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
[cordova] at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482)
[cordova] at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
[cordova] at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:794)
[cordova] ... 48 more
[cordova] Caused by: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
[cordova] at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
[cordova] at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:462)
[cordova] at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
[cordova] at com.android.builder.internal.aapt.v2.QueueableAapt2.lambda$makeValidatedPackage$1(QueueableAapt2.java:179)
[cordova] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[cordova] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[cordova] ... 1 more
[cordova] Caused by: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
[cordova] at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:454)
[cordova] at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:411)
[cordova] at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:332)
[cordova] at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:104)
[cordova]
[cordova] FAILURE: Build failed with an exception.
[cordova]
[cordova] * What went wrong:
[cordova] Execution failed for task ':app:processDebugResources'.
[cordova] > Failed to execute aapt
[cordova]
[cordova] * Try:
[cordova] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[cordova]
[cordova] * Get more help at https://help.gradle.org
[cordova]
[cordova] BUILD FAILED in 1m 44s
Ionic Info:
ionic (Ionic CLI) : 4.1.2
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.0
Cordova:
cordova (Cordova CLI) : 8.1.1 ([email protected])
Cordova Platforms : android 7.0.0, browser 5.0.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.5.0, (and 10 other plugins)
System:
NodeJS : v8.11.1 (C:\Program Files\nodejs\node.exe)
npm : 6.5.0
OS : Windows 10
Plugins
cordova-android-play-services-gradle-release 3.0.0 "cordova-android-play-services-gradle-release"
cordova-android-support-gradle-release 3.0.0 "cordova-android-support-gradle-release"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-facebook4 3.1.0 "Facebook Connect"
cordova-plugin-firebase-lib 3.1.0 "Google Firebase Plugin"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.5.0 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
ionic-plugin-deeplinks 1.0.17 "Ionic Deeplink Plugin"
onesignal-cordova-plugin 2.4.5 "OneSignal Push Notifications"
Project Properties
# Project target.
target=android-27
android.library.reference.1=CordovaLib
android.library.reference.2=app
cordova.system.library.1=com.android.support:support-annotations:27.+
cordova.system.library.2=com.facebook.android:facebook-android-sdk:4.37.0
cordova.system.library.3=com.onesignal:OneSignal:3.10.3
cordova.gradle.include.1=onesignal-cordova-plugin/nak-build-extras-onesignal.gradle
cordova.gradle.include.2=cordova-android-support-gradle-release/nak-cordova-android-support-gradle-release.gradle
cordova.gradle.include.3=cordova-plugin-firebase-lib/nak-build.gradle
cordova.system.library.4=com.google.android.gms:play-services-tagmanager:+
cordova.system.library.5=com.google.firebase:firebase-core:17+
cordova.system.library.6=com.google.firebase:firebase-messaging:+
cordova.system.library.7=com.google.firebase:firebase-config:+
cordova.system.library.8=com.google.firebase:firebase-perf:+
cordova.gradle.include.4=cordova-android-play-services-gradle-release/nak-cordova-android-play-services-gradle-release.gradle
build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' } // Fabrics Maven repository from cordova-plugin-firebase-lib
maven {
url "https://maven.google.com"
}
}
dependencies {
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.google.gms:google-services:4.2.0' // google-services dependency from cordova-plugin-firebase-lib
classpath 'io.fabric.tools:gradle:1.25.4' // fabric dependency from cordova-plugin-firebase-lib
}
}
allprojects {
repositories {
jcenter()
google() // Google's Maven repository from cordova-plugin-firebase-lib
maven {
url "https://maven.google.com"
}
}
//This replaces project.properties w.r.t. build settings
project.ext {
defaultBuildToolsVersion="25.0.2" //String
defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
defaultTargetSdkVersion=26 //Integer - We ALWAYS target the latest by default
defaultCompileSdkVersion=26 //Integer - We ALWAYS compile with the latest by default
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.1'
}
}
}
}
Additional context
I have tried various solutions I found online and on StackOverflow but nothing seems to solve my problem.
I hope the info I gave you is sufficient. If not I will provide you with whatever you might need in order to help me.