Android Build Process Fails on PhoneGap Build
See original GitHub issueEnvironment
- Plugin version: 3.0.0-alpha.18
- Platform: Android
- Cordova version: cli-8.0.0
- Cordova platform version: 7.0.0
- Link to your project: https://github.com/Xyfir/BrHop-PhoneGap
Context
If I add your plugin, the build on PhoneGap Build for Android will break but it works fine for iOS.
Expected Behavior
Android builds shouldn’t break.
Actual Behavior
Android builds break.
Steps to Reproduce
- Add plugin to config.xml
- Rebuild on PhoneGap Build
Debug logs
Build Date: 2018-03-13 19:20:12 +0000
--------------------------------------------------------------------------------
PREPARE OUTPUT
--------------------------------------------------------------------------------
Android Studio project detected
Generating platform-specific config.xml from defaults for android at /app/src/main/res/xml/config.xml
Merging project's config.xml into platform-specific android config.xml
Merging and updating files from [www, ../platform_www] to ../app/src/main/assets/www
copy www/app.js ../app/src/main/assets/www/app.js (new file)
mkdir ../app/src/main/assets/www/cordova-js-src
mkdir ../app/src/main/assets/www/cordova-js-src/android
copy ../platform_www/cordova-js-src/android/nativeapiprovider.js ../app/src/main/assets/www/cordova-js-src/android/nativeapiprovider.js (new file)
copy ../platform_www/cordova-js-src/android/promptbasednativeapi.js ../app/src/main/assets/www/cordova-js-src/android/promptbasednativeapi.js (new file)
copy ../platform_www/cordova-js-src/exec.js ../app/src/main/assets/www/cordova-js-src/exec.js (new file)
copy ../platform_www/cordova-js-src/platform.js ../app/src/main/assets/www/cordova-js-src/platform.js (new file)
mkdir ../app/src/main/assets/www/cordova-js-src/plugin
mkdir ../app/src/main/assets/www/cordova-js-src/plugin/android
copy ../platform_www/cordova-js-src/plugin/android/app.js ../app/src/main/assets/www/cordova-js-src/plugin/android/app.js (new file)
copy ../platform_www/cordova.js ../app/src/main/assets/www/cordova.js (updated file)
rmdir ../app/src/main/assets/www/css (no source)
delete ../app/src/main/assets/www/css/index.css (no source)
rmdir ../app/src/main/assets/www/img (no source)
delete ../app/src/main/assets/www/img/cordova.png (no source)
delete ../app/src/main/assets/www/img/logo.png (no source)
copy www/index.html ../app/src/main/assets/www/index.html (updated file)
rmdir ../app/src/main/assets/www/js (no source)
delete ../app/src/main/assets/www/js/index.js (no source)
Wrote out android application name "BrHop" to /app/src/main/res/values/strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.1.0): 10100
Wrote out Android package name "com.xyfir.brhop" to /app/src/main/java/com/xyfir/brhop/BrHop.java
Updating icons at ../app/src/main/res
copy res/icon/android/hdpi.png ../app/src/main/res/mipmap-hdpi/icon.png (updated file)
copy res/icon/android/ldpi.png ../app/src/main/res/mipmap-ldpi/icon.png (updated file)
copy res/icon/android/mdpi.png ../app/src/main/res/mipmap-mdpi/icon.png (updated file)
copy res/icon/android/xhdpi.png ../app/src/main/res/mipmap-xhdpi/icon.png (updated file)
copy res/icon/android/xxhdpi.png ../app/src/main/res/mipmap-xxhdpi/icon.png (updated file)
copy res/icon/android/xxxhdpi.png ../app/src/main/res/mipmap-xxxhdpi/icon.png (updated file)
Updating splash screens at ../app/src/main/res
delete ../app/src/main/res/drawable-land-hdpi/screen.png (no source)
delete ../app/src/main/res/drawable-land-ldpi/screen.png (no source)
delete ../app/src/main/res/drawable-land-mdpi/screen.png (no source)
delete ../app/src/main/res/drawable-land-xhdpi/screen.png (no source)
delete ../app/src/main/res/drawable-land-xxhdpi/screen.png (no source)
delete ../app/src/main/res/drawable-land-xxxhdpi/screen.png (no source)
copy splash.png ../app/src/main/res/drawable-mdpi/screen.png (new file)
copy res/screen/android/splash-port-hdpi.png ../app/src/main/res/drawable-port-hdpi/screen.png (updated file)
copy res/screen/android/splash-port-ldpi.png ../app/src/main/res/drawable-port-ldpi/screen.png (updated file)
copy res/screen/android/splash-port-mdpi.png ../app/src/main/res/drawable-port-mdpi/screen.png (updated file)
copy res/screen/android/splash-port-xhdpi.png ../app/src/main/res/drawable-port-xhdpi/screen.png (updated file)
copy res/screen/android/splash-port-xxhdpi.png ../app/src/main/res/drawable-port-xxhdpi/screen.png (updated file)
copy res/screen/android/splash-port-xxxhdpi.png ../app/src/main/res/drawable-port-xxxhdpi/screen.png (updated file)
This app does not have additional resource files defined
Prepared android project successfully
--------------------------------------------------------------------------------
PLUGIN OUTPUT
--------------------------------------------------------------------------------
Fetching plugin "cordova-plugin-console" via npm
Installing "cordova-plugin-console" at "1.1.0" for android
Android Studio project detected
Fetching plugin "cordova-plugin-device" via npm
Installing "cordova-plugin-device" at "2.0.1" for android
Android Studio project detected
Fetching plugin "cordova-plugin-dialogs" via npm
Installing "cordova-plugin-dialogs" at "2.0.1" for android
Android Studio project detected
Fetching plugin "cordova-plugin-file" via npm
Installing "cordova-plugin-file" at "6.0.1" for android
Android Studio project detected
The Android Persistent storage location now defaults to "Internal". Please check this plugin's README to see if your application needs any changes in its config.xml.
If this is a new application no changes are required.
If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add:
"<preference name="AndroidPersistentFileLocation" value="Compatibility" />"
to config.xml in order for the application to find previously stored files.
Fetching plugin "cordova-plugin-geolocation" via npm
Installing "cordova-plugin-geolocation" at "4.0.1" for android
Android Studio project detected
Fetching plugin "cordova-plugin-globalization" via npm
Installing "cordova-plugin-globalization" at "1.0.9" for android
Android Studio project detected
Fetching plugin "cordova-plugin-inappbrowser" via npm
Installing "cordova-plugin-inappbrowser" at "2.0.2" for android
Android Studio project detected
Fetching plugin "cordova-plugin-media" via npm
Installing "cordova-plugin-media" at "5.0.2" for android
Plugin dependency "cordova-plugin-file@6.0.1" already fetched, using that version.
Dependent plugin "cordova-plugin-file" already installed on android.
Android Studio project detected
Fetching plugin "cordova-plugin-network-information" via npm
Installing "cordova-plugin-network-information" at "2.0.1" for android
Android Studio project detected
Fetching plugin "cordova-plugin-splashscreen" via npm
Installing "cordova-plugin-splashscreen" at "5.0.2" for android
Android Studio project detected
Fetching plugin "cordova-plugin-whitelist" via npm
Installing "cordova-plugin-whitelist" at "1.3.3" for android
Android Studio project detected
This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
Fetching plugin "cordova-plugin-statusbar" via npm
Installing "cordova-plugin-statusbar" at "2.4.1" for android
Android Studio project detected
Fetching plugin "cordova-plugin-remote-injection" via npm
Installing "cordova-plugin-remote-injection" at "0.5.2" for android
Android Studio project detected
Fetching plugin "cordova-plugin-mauron85-background-geolocation" via npm
Installing "cordova-plugin-mauron85-background-geolocation" at "3.0.0-alpha.18" for android
Android Studio project detected
Subproject Path: CordovaLib
Subproject Path: app
Android Studio project detected
--------------------------------------------------------------------------------
COMPILE OUTPUT
--------------------------------------------------------------------------------
Android Studio project detected
studio
:wrapper
BUILD SUCCESSFUL in 4s
1 actionable task: 1 executed
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_7dz212h78myqgz06alkotkec9.run(/app/build.gradle:144)
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preReleaseBuild UP-TO-DATE
:CordovaLib:compileReleaseAidl
:CordovaLib:compileReleaseRenderscript
:CordovaLib:checkReleaseManifest
:CordovaLib:generateReleaseBuildConfig
:CordovaLib:prepareLintJar
:CordovaLib:generateReleaseResValues
:CordovaLib:generateReleaseResources
:CordovaLib:packageReleaseResources
:CordovaLib:platformAttrExtractor
:CordovaLib:processReleaseManifest
:CordovaLib:javaPreCompileRelease
:CordovaLib:processReleaseJavaRes NO-SOURCE
:app:preBuild UP-TO-DATE
:app:preReleaseBuild
Download https://jcenter.bintray.com/org/slf4j/slf4j-api/1.7.21/slf4j-api-1.7.21.pom
Download https://jcenter.bintray.com/com/github/tony19/logback-android-classic/1.1.1-6/logback-android-classic-1.1.1-6.pom
Download https://jcenter.bintray.com/com/github/tony19/logback-android-core/1.1.1-6/logback-android-core-1.1.1-6.pom
Download https://jcenter.bintray.com/org/slf4j/slf4j-parent/1.7.21/slf4j-parent-1.7.21.pom
Download https://jcenter.bintray.com/com/github/tony19/apktool-lib/1.4.4-3/apktool-lib-1.4.4-3.pom
:app:compileReleaseAidl
:CordovaLib:packageReleaseRenderscript NO-SOURCE
:app:compileReleaseRenderscript
:app:checkReleaseManifest
:app:generateReleaseBuildConfig
:app:prepareLintJar
:app:generateReleaseResValues
:app:generateReleaseResources
:app:mergeReleaseResources
:app:createReleaseCompatibleScreenManifests
:app:processReleaseManifest
:app:splitsDiscoveryTaskRelease
:app:compileReleaseNdk NO-SOURCE
:CordovaLib:mergeReleaseShaders
:CordovaLib:compileReleaseShaders
:CordovaLib:generateReleaseAssets
:CordovaLib:mergeReleaseAssets
:app:mergeReleaseShaders
:app:compileReleaseShaders
:app:generateReleaseAssets
:app:mergeReleaseAssets
:app:extractTryWithResourcesSupportJarRelease
:CordovaLib:compileReleaseNdk NO-SOURCE
:CordovaLib:mergeReleaseJniLibFolders
:CordovaLib:transformNativeLibsWithMergeJniLibsForRelease
:CordovaLib:transformNativeLibsWithIntermediateJniLibsForRelease
:app:mergeReleaseJniLibFolders
:app:processReleaseJavaRes NO-SOURCE
:app:validateSigningRelease
:CordovaLib:processReleaseResources
:CordovaLib:generateReleaseSources
:CordovaLib:compileReleaseJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease
:app:processReleaseResources/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/9b48f8d386a4af6f6c71a54e788de2c5/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.
/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/9b48f8d386a4af6f6c71a54e788de2c5/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/ttcIndex not found.
/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:94: error: resource android:attr/fontVariationSettings not found.
/app/build/intermediates/incremental/mergeReleaseResources/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 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)
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)
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processReleaseResources'.
> 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 5s
37 actionable tasks: 37 executed
Error: /gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/9b48f8d386a4af6f6c71a54e788de2c5/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.
/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0-alpha1.aar/9b48f8d386a4af6f6c71a54e788de2c5/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/ttcIndex not found.
/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:94: error: resource android:attr/fontVariationSettings not found.
/app/build/intermediates/incremental/mergeReleaseResources/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 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)
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:processReleaseResources'.
> 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 5s
at ChildProcess.whenDone (/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:12 (1 by maintainers)
Top Results From Across the Web
PhoneGap build fail - Android · Issue #240 - GitHub
This error is caused by a Gradle version mismatch. The exact cause depends on which other plugins and which version of the cordova-android...
Read more >PhoneGap Build Fails on Android Build - Google Groups
My normal PhoneGap Build creates a build for both iOS and Android. Recently, the Android build failed with the following log file.
Read more >cordova - Phonegap android build error - Stack Overflow
When you run with: phonegap serve ProjectName,it runs on browser. It is strongly possible that it does not uses that icons in browser....
Read more >Android Build Fails due to Support Version • Post • Neptune ...
Hi, two weeks ago I was still able to build successfully using Phonegap, but now my Android Build always fails (iOs is ......
Read more >Adobe phonegap build fails for Android - Mendix Forum
xml:41: error: attribute 'android:name' in <activity> tag must be a valid Java class name. Failed to execute aapt com.android.ide.common.process ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Guys, I’ve solved the problem !!!
go to your platforms\android folder, edit the project.properties file. Locate the line cordova.system.library.2=com.android.support:support-v4:+ and replace it to cordova.system.library.2=com.android.support:support-v4:27.1.0
For me it worked like a charm. 😃
Good Morning, I performed the above commands, but the error still continues in version 3.9.2 of Ionic. I’ve been looking for a solution for 3 weeks, but so far I have not been able to. Before I had installed version 3.0.1 of Android Studio, I removed and installed 2.2.3, it still did not work. Could you please help me? I need to use the cordova-plugin-mauron85-background-geolocation plugin.
Thanks!