title: Unable to find attribute android:font
body: <p>Get the following error when building a project with PhoneGap Build after adding the cordova-background-geolocation-lt plugin:</p>
  
  <pre><code>:processArmv7DebugResourcesERROR: In &lt;declare-styleable&gt; FontFamilyFont, unable to find attribute android:font  
  ERROR: In &lt;declare-styleable&gt; FontFamilyFont, unable to find attribute android:fontStyle  
  ERROR: In &lt;declare-styleable&gt; FontFamilyFont, unable to find attribute android:fontWeight  
  
   FAILED  
  
  FAILURE: Build failed with an exception.  
  
  * What went wrong:  
  Execution failed for task ':processArmv7DebugResources'.  
  &gt; 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: 4.171 secs  
  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.  
  Note: Some input files use or override a deprecated API.  
  Note: Recompile with -Xlint:deprecation for details.  
  ERROR: In &lt;declare-styleable&gt; FontFamilyFont, unable to find attribute android:font  
  ERROR: In &lt;declare-styleable&gt; FontFamilyFont, unable to find attribute android:fontStyle  
  ERROR: In &lt;declare-styleable&gt; FontFamilyFont, unable to find attribute android:fontWeight  
  
  
  FAILURE: Build failed with an exception.  
  
  * What went wrong:  
  Execution failed for task ':processArmv7DebugResources'.  
  &gt; 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.  
    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)
  </code></pre>
  
  <p>My config.xml looks like this (redacted):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;  
  &lt;widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id=“[..]” versionCode="[..]" versionName="[..]" version="[..]"&gt;  
      &lt;preference name='phonegap-version' value='cli-7.0.1' /&gt;  
      &lt;name&gt;[..]&lt;/name&gt;  
      &lt;description&gt;[..]&lt;/description&gt;  
      &lt;author href="[..]" email="[..]"&gt;[..]&lt;/author&gt;  
      &lt;content src="index.html" /&gt;  
      &lt;icon src="res/icon/ios/icon-72@2x.png" /&gt;  
      &lt;preference name="FullScreen" value="false" /&gt;  
      &lt;preference name="webviewbounce" value="false" /&gt;  
      &lt;preference name="detect-data-types" value="true" /&gt;  
      &lt;preference name="exit-on-suspend" value="false" /&gt;  
      &lt;preference name="FadeSplashScreen" value="false"/&gt;  
      &lt;preference name="AutoHideSplashScreen" value="false" /&gt;  
      &lt;platform name="android"&gt;  
          &lt;preference name="xwalkMultipleApk" value="false" /&gt;  
          &lt;preference name="AndroidPersistentFileLocation" value="Compatibility" /&gt;  
          &lt;gap:config-file parent="/manifest/application"&gt;  
              android:windowSoftInputMode="adjustPan"  
          &lt;/gap:config-file&gt;  
          &lt;preference name="LoadUrlTimeoutValue" value="700000" /&gt;  
          &lt;preference name="android-build-tool" value="gradle" /&gt;  
          &lt;preference name="CodePushDeploymentKey" value="[..]" /&gt;  
      &lt;/platform&gt;  
      &lt;feature name="Device"&gt;  
          &lt;param name="ios-package" value="CDVDevice" /&gt;  
          &lt;param name="android-package" value="org.apache.cordova.device.Device" /&gt;  
      &lt;/feature&gt;  
      &lt;feature name="File"&gt;  
          &lt;param name="ios-package" value="CDVFile" /&gt;  
          &lt;param name="android-package" value="org.apache.cordova.file.FileUtils" /&gt;  
      &lt;/feature&gt;  
      &lt;feature name="FileTransfer"&gt;  
          &lt;param name="ios-package" value="CDVFileTransfer" /&gt;  
          &lt;param name="android-package" value="org.apache.cordova.filetransfer.FileTransfer" /&gt;  
      &lt;/feature&gt;  
      &lt;!-- Cordova plugins --&gt;  
      &lt;plugin name="cordova-plugin-camera" spec="~2.3.1"&gt;  
          &lt;variable name="CAMERA_USAGE_DESCRIPTION" value="[..]" /&gt;  
          &lt;variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="[..]" /&gt;  
      &lt;/plugin&gt;  
      &lt;plugin name="cordova-plugin-device" source="npm" spec="1.1.2" /&gt;  
      &lt;plugin name="cordova-plugin-geolocation" spec="2.4.3"&gt;  
          &lt;variable name="GEOLOCATION_USAGE_DESCRIPTION" value="[..]" /&gt;  
      &lt;/plugin&gt;  
      &lt;plugin name="cordova-plugin-inappbrowser" source="npm" spec="1.3.0" /&gt;  
      &lt;plugin name="cordova-plugin-network-information" source="npm" spec="1.2.0" /&gt;  
      &lt;plugin name="cordova-plugin-vibration" source="npm" spec="2.1.0" /&gt;  
      &lt;plugin name="cordova-plugin-media" source="npm" spec="2.2.0" /&gt;  
      &lt;plugin name="cordova-plugin-screen-orientation" source="npm" version="v1.4.1" /&gt;  
      &lt;plugin name="cordova-plugin-splashscreen" source="npm" version="3.2.2" /&gt;  
      &lt;plugin name="cordova-plugin-statusbar" source="npm" spec="2.1.3" /&gt;  
      &lt;plugin name="cordova-plugin-file-transfer" source="npm" spec="1.5.1" /&gt;  
      &lt;plugin name="cordova-plugin-file" source="npm" spec="4.2.0" /&gt;  
      &lt;plugin name="cordova-sqlite-storage" source="npm" version="0.8.5" /&gt;  
      &lt;plugin name="cordova-plugin-code-push" source="npm" version="v1.9.3-beta" /&gt;  
      &lt;plugin name="ionic-plugin-keyboard" source="npm" version="v2.2.0" /&gt;  
      &lt;plugin name="phonegap-plugin-barcodescanner" source="npm" version="5.0.0" /&gt;  
      &lt;plugin name="uk.co.workingedge.phonegap.plugin.launchnavigator" source="npm" spec="3.1.1" /&gt;  
      &lt;plugin name="cordova-plugin-crosswalk-webview" spec="~2.3.0" /&gt;  
      &lt;plugin name="cordova-plugin-email" source="npm" version="1.1.1" /&gt;  
      &lt;plugin name="cordova-plugin-appavailability" spec="^0.4.2" /&gt;  
      &lt;plugin name="com.xmartlabs.cordova.market" spec="https://github.com/xmartlabs/cordova-plugin-market" /&gt;  
      &lt;plugin name="cordova-plugin-x-socialsharing" spec="^5.1.8" /&gt;  
      &lt;plugin name="cordova-background-geolocation-lt" source="npm" version="2.8.5" /&gt;  
  &lt;/widget&gt;
  </code></pre>
  
  <p>This problem has been encounted before:</p>
  
  <ul>
  <li><a href="https://github.com/transistorsoft/cordova-background-geolocation-lt/issues/507" rel="nofollow noreferrer">https://github.com/transistorsoft/cordova-background-geolocation-lt/issues/507</a></li>
  <li><a href="https://forum.ionicframework.com/t/android-build-broken-after-gradle-dependencies-update-execution-failed-for-task-processdebugresources-com-android-ide-common-process-processexception-failed-to-execute-aapt/109982/2" rel="nofollow noreferrer">https://forum.ionicframework.com/t/android-build-broken-after-gradle-dependencies-update-execution-failed-for-task-processdebugresources-com-android-ide-common-process-processexception-failed-to-execute-aapt/109982/2</a></li>
  <li><a href="https://stackoverflow.com/questions/47062650/unable-to-find-attribute-androidfont-for-v7-support">unable to find attribute android:font for v7 support</a></li>
  <li><a href="https://github.com/mauron85/react-native-background-geolocation/issues/116" rel="nofollow noreferrer">https://github.com/mauron85/react-native-background-geolocation/issues/116</a></li>
  <li><a href="https://forums.adobe.com/thread/2405676" rel="nofollow noreferrer">https://forums.adobe.com/thread/2405676</a></li>
  </ul>
  
  <p>The generally accepted advice is that <code>com.android.support:support-v4:27</code> is causing the problem, so if you have <code>com.android.support:support-v4:+</code>, then you should specify <code>com.android.support:support-v4:23.+</code>.</p>
  
  <p>However, I haven't got this to work as of yet. I've tried to adding this line:</p>
  
  <pre><code>&lt;framework src="com.android.support:support-v4:23+" value="gradle" /&gt;
  </code></pre>
  
  <p>But that doesn't seem to have an effect for me.</p>
  
  <p>I have cross posted this on the plugins issue tracker: <a href="https://github.com/transistorsoft/cordova-background-geolocation-lt/issues/563" rel="nofollow noreferrer">https://github.com/transistorsoft/cordova-background-geolocation-lt/issues/563</a></p>
  
  <p>And on the PhoneGap Build forum: <a href="https://forums.adobe.com/message/10028062" rel="nofollow noreferrer">https://forums.adobe.com/message/10028062</a></p>
  
  <p>Any help would be appreciated.</p>