I have upgraded my app to support SDK 26 and now Google Analytics causes crashes when running on Android Oreo:
Fatal Exception: java.lang.RuntimeExcep
I recommend upgrading to play-services version 11.4.0. Add this in your Gradle file:
compile "com.google.android.gms:play-services-analytics:11.4.0
From the Play Services Revision 11.4.0, analytics section:
AnalyticsJobService
. This class provides compatibility support for Android O and is used by Analytics to upload data. No action is necessary to use this class, it’s added automatically as part of the Analytics package.getContext()
method of the AnalyticsService
class.CampaignTrackingService
class.and also you have to get permission. android:permission="android.permission.BIND_JOB_SERVICE"
See below https://developers.google.com/android/reference/com/google/android/gms/analytics/AnalyticsJobService