Outsystems Now install additional plugins error - libsqlc-native-driver.so not found

Outsystems Now install additional plugins error - libsqlc-native-driver.so not found

  
I was trying to add "cordova-plugin-zeroconf" plugin to OutsystemsNow project for Android:
Outsystems  cordova plugin add cordova-plugin-zeroconf
But this gives an error:
Fetching plugin "cordova-plugin-zeroconf" via npm

Installing "cordova-plugin-zeroconf" for android

Error during processing of action! Attempting to revert...

Error: Uh oh!

"/OutSystemsNow-Android-master/outsystems-app-android/Outsystems/plugins/cordova-sqlite-storage/src/android/libs/arm64-v8a/libsqlc-native-driver.so" not found!

If I try to run project after this error I have "build failed" with 37 errors like this:
Error:(13, 29) No resource found that matches the given name (at 'background' with value '@color/divider_color').

Is there any incoptability with some plugins or additional steps are requered?

Thank you.

Hi Mykola,

Thanks for your feedback.
In fact, we had an issue on our project that was blocking the installation of some cordova plugins. Also, it is already fixed and available now on github.
So, I'm asking you to update your code with the latest version available on github.

Let me know if you find anything wrong on this new version.

Cheers,
Luís Silva


Hi Luís

I'm working with Mikola on same project, and tried with last version on github and got these errors after plugin installed:  

/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/layout/activity_applications.xml
Error:(13, 29) No resource found that matches the given name (at 'background' with value '@color/divider_color').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/layout-sw600dp/activity_applications.xml
Error:(36, 29) No resource found that matches the given name (at 'background' with value '@color/divider_color').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/layout/activity_hub_app.xml
Error:(46, 40) No resource found that matches the given name (at 'textColor' with value '@color/white_color_alpha').
Error:(64, 37) No resource found that matches the given name (at 'background' with value '@color/button_select_text_color').
Error:(137, 36) No resource found that matches the given name (at 'textColor' with value '@color/white_color_alpha').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/layout-land/activity_hub_app.xml
Error:(42, 36) No resource found that matches the given name (at 'textColor' with value '@color/white_color_alpha').
Error:(60, 33) No resource found that matches the given name (at 'background' with value '@color/button_select_text_color').
Error:(131, 36) No resource found that matches the given name (at 'textColor' with value '@color/white_color_alpha').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/layout-sw600dp/activity_hub_app.xml
Error:(42, 36) No resource found that matches the given name (at 'textColor' with value '@color/white_color_alpha').
Error:(82, 37) No resource found that matches the given name (at 'background' with value '@color/button_select_text_color').
Error:(143, 40) No resource found that matches the given name (at 'textColor' with value '@color/white_color_alpha').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/layout-sw600dp-port/activity_hub_app.xml
Error:(42, 36) No resource found that matches the given name (at 'textColor' with value '@color/white_color_alpha').
Error:(82, 37) No resource found that matches the given name (at 'background' with value '@color/button_select_text_color').
Error:(145, 40) No resource found that matches the given name (at 'textColor' with value '@color/white_color_alpha').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/layout/activity_login.xml
Error:(28, 28) No resource found that matches the given name (at 'textColor' with value '@color/white_color_alpha').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/layout-land/activity_login.xml
Error:(36, 32) No resource found that matches the given name (at 'textColor' with value '@color/white_color_alpha').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/layout-sw600dp/activity_login.xml
Error:(36, 32) No resource found that matches the given name (at 'textColor' with value '@color/white_color_alpha').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/layout/activity_web_application.xml
Error:(57, 33) No resource found that matches the given name (at 'background' with value '@color/button_disable').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/layout/applications_grid_item.xml
Error:(42, 28) No resource found that matches the given name (at 'textColor' with value '@color/grid_text_color').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/layout-sw600dp/applications_grid_item.xml
Error:(49, 32) No resource found that matches the given name (at 'textColor' with value '@color/red_color').
Error:(60, 32) No resource found that matches the given name (at 'textColor' with value '@color/grid_text_color').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/drawable/actionbar_background_selector.xml
Error:(4, 29) No resource found that matches the given name (at 'drawable' with value '@color/grid_select_color').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/drawable/background_images_aplications.xml
Error:(4, 27) No resource found that matches the given name (at 'color' with value '@color/background_image_application_color').
Error:(8, 24) No resource found that matches the given name (at 'color' with value '@color/background_image_application_color').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/drawable/background_loading_web_application.xml
Error:(4, 27) No resource found that matches the given name (at 'color' with value '@color/background_loading_web_application').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/drawable/button_text_selector.xml
Error:(5, 24) No resource found that matches the given name (at 'color' with value '@color/button_select_text_color').
Error:(9, 24) No resource found that matches the given name (at 'color' with value '@color/button_select_text_color').
Error:(12, 24) No resource found that matches the given name (at 'color' with value '@color/white_color').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/drawable/edit_text_background.xml
Error:(8, 24) No resource found that matches the given name (at 'color' with value '@color/white_color').
Error:(10, 27) No resource found that matches the given name (at 'color' with value '@color/white_color').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/drawable-sw600dp/item_border.xml
Error:(10, 24) No resource found that matches the given name (at 'color' with value '@color/divider_color').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/drawable/item_border_selected.xml
Error:(4, 24) No resource found that matches the given name (at 'color' with value '@color/grid_select_color').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/drawable-sw600dp/item_border_selected.xml
Error:(4, 27) No resource found that matches the given name (at 'color' with value '@color/grid_select_color').
Error:(10, 24) No resource found that matches the given name (at 'color' with value '@color/divider_color').
/Users/cmc/mobile/outsystems-app-android/Outsystems/platforms/android/res/drawable/os_progress_bar.xml
Error:(17, 41) No resource found that matches the given name (at 'startColor' with value '@color/red_color').
Error:(18, 39) No resource found that matches the given name (at 'endColor' with value '@color/red_color').
Error:Execution failed for task ':OutSystems:platforms:android:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/cmc/Library/Android/sdk/build-tools/23.0.2/aapt'' finished with non-zero exit value 1

Can you help me?

Thank you!
Hi Carlos,

Probably the cordova plugin that you have installed on your project removed some required values.
Please go to the colors.xml file of your project (you can find it at "OutSystems\platforms\android\res\values" folder) and check the differences between yours and the latest version available at github, and add the missing values.

Cheers,
Luís Silva
Hi Luís,
Replacing colors.xml values solved this particular error but there is lots of others.
What version of cordova should be onstalled on my system to properly add plugins to OutsystemsNow with command line? 
I have current version 6.1.1 installed and having a warning message before any command:
Using this version of Cordova with older version of cordova-android is being deprecated. Consider upgrading to cordova-android@5.0.0 or newer.


I've tried to update project with "cordova platform update android" but it bocomes broken and has similar errors as if i tried to install plugins.


Is there another way of adding plugins to outsystemsnow for android (ios version working ok)? Maybe manually? What files should I change? 

I would appreciate any help. Thank you.

Cheers,
Nick

Hi Mykola,

You can use that cordova version to add plugins to your project, and you are doing it right. However, there are some plugins that could broke your project, even if you are using the latest version of cordova. There is no science here. You just need to be careful when installing a new plugin, because some plugins change the colors.xml/string.xml file, others change all the gradle files, or the manifest file...

I recommend you to always use source control on your project, so you can easily check if any plugin has caused some broken changes on your project or not.

Also, the cordova upgrade is a painful task too... 

Cheers,
Luís Silva
Solution
Hi Luís,

Your suggestion to use version control to see changes made by plugin was very helpfull :) We managed to solve problem with plugins installations this way.

For getting work cordova-plugin-zeroconf we made this steps:
- load clean OSNow android 
- create new local git repository (I'm using SourceTree) in that folder
- commit all files as "clean version"
- in terminal navigate to /outsystems-app-android/Outsystems folder and run "cordova plugin add 
https://github.com/becvert/cordova-plugin-zeroconf.git"
- check what files where added and changed on SourceTree and commit only files and line related to ZeroConf plugin and revoke  and remove all other changes.
- added 
slf4j-api-1.7.12.jar and slf4j-android-1.7.12.jar files to .../android/libs as sugested here (http://stackoverflow.com/questions/32110674/cloudmine-java-lang-noclassdeffounderror-failed-resolution-of-lorg-slf4j-logge) as we had exactly same error.

Cheers,
Nick
Solution