While Phonegap barcodescanner error it causing ionic build error

ERROR: In FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In FontFamilyFont, unable to find attribute android:ttcIndex

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: 19.861 secs
(node:13931) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /home/bcs/Mobilebuilder/ionicapps/Doom/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.
ERROR: In FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In FontFamilyFont, unable to find attribute android:ttcIndex

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.
    (node:13931) [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.

While adding Phonegap barcodescanner plugin while running ionic cordova run android

1 Like

Someone’s already opened an issue for this on GitHub.

For the time being, I am using this forked version of the plugin.

ionic cordova plugin add https://github.com/sburnicki/phonegap-plugin-barcodescanner.git --variable CAMERA_USAGE_DESCRIPTION='Ability to scan QR codes'