[Google Analytics Plugin] Application becomes broken and doesn't open

[Google Analytics Plugin] Application becomes broken and doesn't open

Forge Component
Published on 2017-10-26 by Experts
7 votes
Published on 2017-10-26 by Experts


I've created a simple application on my personal environment just to test this Google Analytics Plugin and I noticed that when I add the Google Analytics Plugin reference and generate the native app, the application becomes broken and doesn't even open on the mobile device (I've tested on Android).

After some digging I found this post describing the problem and suggesting a solution: https://www.outsystems.com/forums/discussion/32962/android-build-fails-with-firebase-cloud-messaging-fcm-and-google-analytics/

So I did the sugestion and cloned the github project that is used in the Google Analytics Plugin, and the only change I've made was:

  • on the plugin.xml edited the line 52:
    • From:  "<framework src="com.google.android.gms:play-services-analytics:+" />" 
    • To:       "<framework src="com.google.android.gms:play-services-analytics:11.+" />"

This simple change did the trick and now I'm able to open the app on the mobile device and use Google Analytics.

Hope this helps and promotes a fix.

Best Regards