[Background Location Plugin] Generate Android App - "Error compiling Cordova plugin: ."

[Background Location Plugin] Generate Android App - "Error compiling Cordova plugin: ."

  
Forge Component
(4)
Published on 2017-11-27 by Alexandre Costa
4 votes
Published on 2017-11-27 by Alexandre Costa

Does anyone have an idea why this error is occurring? 

I'm generating the sample app for Android in the Background Location Plugin application.

I found the Android generation log, and the error seems to be as below. Could you help me with this error?


[2017-10-26T09:24:27.876Z] [ERROR] 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 <declare-styleable> FontFamilyFont, unable to find attribute android:font
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight

HI all

I run into this same error and managed to resolve it by doing the following:

I opened the BackgroundLocationPlugin


Once opened, I modified the Extensibility Configurations

and set it to an explicit version that I know worked, in this case 2.7.6

{
    "plugin":
    {
        "url": "https://github.com/transistorsoft/cordova-background-geolocation-lt.git#2.7.6"
    }
}




this allowed me to generate the apk without errors.


You can obviously play around with the "latest" version that works for you by looking at the version history and modify the URL in the Extensibility Configuration, in this case 2.7.6 worked for me.


Linked to the version history : https://github.com/transistorsoft/cordova-background-geolocation-lt/releases




If you are planning to use this plugin in a production app that gets submitted to stores, there is an additional License key "hack" that needs to be done on the apk, I'm more than willing share this with those that need it.


Kind regards, and happy development

Leeroy Stander


Leeroy Stander wrote:

and set it to an explicit version that I know worked, in this case 2.7.6

{
    "plugin":
    {
        "url": "https://github.com/transistorsoft/cordova-background-geolocation-lt.git#2.7.6"
    }
}

Does this still work? When I try to change the plugin to this path (which is different from the original, not just a different version), when I recompile and run the SampleApp I get an error that the plugin could not be found (on Android, Debug build).

Am I missing something? Cheers!


Miguel Melo wrote:

Leeroy Stander wrote:

and set it to an explicit version that I know worked, in this case 2.7.6

{
    "plugin":
    {
        "url": "https://github.com/transistorsoft/cordova-background-geolocation-lt.git#2.7.6"
    }
}

Does this still work? When I try to change the plugin to this path (which is different from the original, not just a different version), when I recompile and run the SampleApp I get an error that the plugin could not be found (on Android, Debug build).

Am I missing something? Cheers!


If that URL isn't working, this may be worth a shot.  I have had to do this on a few plugins that were updated and no longer worked after a new compile.

{ "plugin": { "identifier": "cordova-background-geolocation-lt@2.7.6" } }

You can test this using the NPM (Node Package Manager) to see if this package will download for you.

npm install cordova-background-geolocation-lt@2.7.6 This command in NPM does pull the code, so the above *should* work in outsystems.

I upload a new vesion of plugin, this version works fine, please test and tell me if ok. I will upload a new demo.

Hi Alexandre, have you uploaded the new version of the plugin and app already? They still come up as November 2017 on the forge. Thanks!

I am also getting compile error please update new version if it is fixed.


Thank you