Error while generating .apk file

Hello Team,

I am trying to build a simple outsystems plugin from a cordova plugin CleverTap.

I implement the basic functionality using template_plugin and after that I used this plugin in my test module.

So, I am not able to generate .apk of test module because of 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."

Please find attached error log file.

As the message states, your plugin is using some libraries that are not supported by the current MABS version. My suggestion, taking a quick look at your repository, is that you try to import a older release that still might point out to pre-AndroidX library implementation and see if it works.


If not, my suggestion is that either you change the code to avoid that dependency - not recommended - or open a support case, although I don't think you'll be successful within a reasonable timeframe.


Cheers!

Allow me to point you to the Troubleshooting Guide, specifically the AndroidX section, it might help you overcome this blocker.

https://success.outsystems.com/Support/Enterprise_Customers/Troubleshooting/MABS_Upgrade_Troubleshooting_Guide_-_Android#AndroidX_support_library_usage


Cheers,

João Gonçalves

Solution

Hello Swapnil, 


I tried the following to get the Clevertap plugin to build. 

1) Do not take the latest versions of android release of the libraries in question. This needs to be updated in the plugins.xml 

2) Add hooks to ensure you use gradle 3.0.1 instead of 3.0.0. 

I used a script to update thebuild.gradle file for gradle classpath from 3.0.0 to 3.0.1 and a hook in cordova for executing the script. 

Check out the below link for more details 

https://www.outsystems.com/blog/posts/how-mobile-apps-build-service-works/


Best Regards

Amal

Solution

Check the plugin that you are using that is not on the following list and configure your MABS in service centre according to the recommended version. Click here

Amal Raj wrote:

Hello Swapnil, 


I tried the following to get the Clevertap plugin to build. 

1) Do not take the latest versions of android release of the libraries in question. This needs to be updated in the plugins.xml 

2) Add hooks to ensure you use gradle 3.0.1 instead of 3.0.0. 

I used a script to update thebuild.gradle file for gradle classpath from 3.0.0 to 3.0.1 and a hook in cordova for executing the script. 

Check out the below link for more details 

https://www.outsystems.com/blog/posts/how-mobile-apps-build-service-works/


Best Regards

Amal

Thank you Amal!

Provide solution is worked for me. Now .apk file is generated successfully and plugin functionality also working for android.