[Geofence Plugin] Error generating android app

Forge Component
(0)
Published on 2019-08-28 by Experts
0 votes
Published on 2019-08-28 by Experts

Hi everyone

I'm testing the geofence pluging and, when i try to generate the android app in order to test in my smartphone, i get an error: I've tested the Geofencing Sample App, and also generating a brand new project with only this plugin, and in both cases happen the same.


Error generating application. At least one Cordova plugin used in the build requires an AndroidX library, which is not currently compatible with MABS. Check your plugins configuration.

I've tried to change the MABS version for this module, but it happens the same for all versions available on Service Center.

Can anyone help me with this issue ?


Thanks in advance

Hello, based on this URL: https://success.outsystems.com/Support/Enterprise_Customers/Troubleshooting/MABS_Upgrade_Troubleshooting_Guide_-_Android

"AndroidX support library usage


Symptoms

When requesting a build, you're getting the following error:

  • Error generating application. At least one Cordova plugin used in the build requires an AndroidX library, which is not currently compatible with MABS. Check your plugins configuration.



Cause

This error occurs when building an app with a plugin that uses an AndroidX support library or a dependency that uses one. AndroidX is currently not compatible with MABS. There is a conflict caused by using AndroidX support libraries together with older Android support libraries. A common example of the dependency issue is Google Mobile Services (GMS) dependencies.

The log file should contain something similar to:

* What went wrong:
Execution failed for task ':app:processReleaseManifest'.
> Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
    is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-20:19 to override.



Resolution

Check your plugins code and look for gradle dependencies that may use AndroidX. Dependencies related to Google that don't have their versions locked (so the latest version is always used) are the most likely culprits.

An example:

  • implementation "com.google.android.gms:play-services-maps:+"

After you find the plugin(s) with the problematic dependencies you can:

  • Try to upgrade/downgrade the plugin(s) to another version that may lock these dependencies

If the issue remains:

  • Modify the plugin(s) to lock the problematic dependency versions"


Good luck!

Dear experts at outSystems,

I have the same problem creating the android mobile app of the geo fence sample. I am not sure how i am supposed to solve "There is a conflict caused by using AndroidX support libraries together with older Android support libraries", "Check your plugins code and look for gradle dependencies that may use AndroidX.".

Can a new version be published where these cradle dependencies are solved? You are the experts so it should not be a problem, right?

Saludos,

Wilko

yes ... this problem remain. I gotta the same problem.


Cheers

wilko odijk wrote:

Dear experts at outSystems,

I have the same problem creating the android mobile app of the geo fence sample. I am not sure how i am supposed to solve "There is a conflict caused by using AndroidX support libraries together with older Android support libraries", "Check your plugins code and look for gradle dependencies that may use AndroidX.".

Can a new version be published where these cradle dependencies are solved? You are the experts so it should not be a problem, right?

Saludos,

Wilko

Did you manage this problem? Wilko.