Ionic 2 Android build fails when plugin is added to project
See original GitHub issueYour Environment
- Plugin version: 2.2.4
- Platform: Android
- OS version: Linux Mint 18
- Device manufacturer and model: -
- Cordova version (
cordova -v
): 6.4.0 - Cordova platform version (
cordova platform ls
): Installed platforms: android 6.0.0 Available platforms: amazon-fireos ~3.6.3 (deprecated) blackberry10 ~3.8.0 browser ~4.1.0 firefoxos ~3.6.3 ubuntu ~4.3.4 webos ~3.7.0 - Plugin configuration options: -
- Link to your project: -
Issue details posted originally here: https://github.com/driftyco/ionic-native/issues/752 and Ionic team says it’s this plugin’s issue.
When I generate a new starter project:
ionic start test-project --v2
and add the BackgroundGeolocation plugin from Ionic Native:
ionic plugin add cordova-plugin-mauron85-background-geolocation
the android build:
ionic build android
fails with this error:
:processDebugResources
/home/pavlina/Projects/ionic-2.rc-1/platforms/android/res/xml/authenticator.xml:5:19-33: AAPT: No resource found that matches the given name (at 'icon' with value '@drawable/icon').
/home/pavlina/Projects/ionic-2.rc-1/platforms/android/res/xml/authenticator.xml:6:24-38: AAPT: No resource found that matches the given name (at 'smallIcon' with value '@drawable/icon').
/home/pavlina/Projects/ionic-2.rc-1/platforms/android/build/intermediates/res/merged/debug/xml/authenticator.xml:2: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/icon').
/home/pavlina/Projects/ionic-2.rc-1/platforms/android/build/intermediates/res/merged/debug/xml/authenticator.xml:2: error: Error: No resource found that matches the given name (at 'smallIcon' with value '@drawable/icon').
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: 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.
BUILD FAILED
Total time: 9.847 secs
Error: /home/pavlina/Projects/ionic-2.rc-1/platforms/android/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.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/home/pavlina/Projects/ionic-2.rc-1/platforms/android/res/xml/authenticator.xml:5:19-33: AAPT: No resource found that matches the given name (at 'icon' with value '@drawable/icon').
/home/pavlina/Projects/ionic-2.rc-1/platforms/android/res/xml/authenticator.xml:6:24-38: AAPT: No resource found that matches the given name (at 'smallIcon' with value '@drawable/icon').
/home/pavlina/Projects/ionic-2.rc-1/platforms/android/build/intermediates/res/merged/debug/xml/authenticator.xml:2: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/icon').
/home/pavlina/Projects/ionic-2.rc-1/platforms/android/build/intermediates/res/merged/debug/xml/authenticator.xml:2: error: Error: No resource found that matches the given name (at 'smallIcon' with value '@drawable/icon').
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: 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.
Please let me know how to fix this, as the plugin is not usable for me at the moment and I need it in my project.
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Android build fails when adding Ionic Native plugin ... - GitHub
Run with --info or --debug option to get more log output. BUILD FAILED Total time: 9.847 secs Error: /home/pavlina/Projects/ionic-2.rc-1/ ...
Read more >Ionic build android failed with plugin error - Stack Overflow
I ran into a similar problem with my Android build on Cordova. The solution was to install a gradle plugin -- you might...
Read more >Cordova Android 11 Build Error - Ionic Forum
I have upgraded cordova-android of my ionic 6 project from 10.1.2 to 11.0.0 using below commands as shown in this cordova's official blog....
Read more >Ionic Appflow Android package build fails with ...
The best practice for resolving this issue is to evaluate the plugins for the project and remove or upgrade plugins that are using...
Read more >CANNOT BUILD ANDROID APP WITH PUSH PLUGIN ADDED.
APAR status. Closed as program error. Error description. Cannot build Android app with push plugin added. Configure project :app Project evaluation failed ......
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
It is not closed. The ionic issue is closed, not this one.
fixed in 2.2.5. thanks to @SPR-JoshLamkin