PiwikPRO / PPMS-PublicDocs

Public documentation for developers
3 stars 11 forks source link

Android SDK documentation does not mention that com.google.android.gms:play-services-ads-identifier is required #520

Closed aeirola closed 1 year ago

aeirola commented 3 years ago

Without explicitly depending on the library, the app crashes with the following stack trace:

Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;
at pro.piwik.sdk.Tracker$1.doInBackground(Tracker.java:225)
at pro.piwik.sdk.Tracker$1.doInBackground(Tracker.java:220)
at android.os.AsyncTask$3.call(AsyncTask.java:394)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)

thus any user of the SDK needs to include

implementation "com.google.android.gms:play-services-ads-identifier:17.0.0"

in their build.gradle configuration, or depend on some other library which includes the library.

Alternatively, the Android SDK itself could specify the required library as a dependency.

aeirola commented 3 years ago

Apparently this only happens if you have a dependency which increases the version of com.google.android.gms:play-services-basement from 11.0.4 to 15.0.0 or higher. This is why it probably works on demo applications.

MGaetan89 commented 2 years ago

I've also reported it here, so it will hopefully be fixed in the library itself

harmasz commented 2 years ago

Sorry for the long wait. We can confirm that we will be working on this in the library in the next couple of weeks.

MGaetan89 commented 2 years ago

It looks like this was addressed in 1.1.6. So I guess that this can be closed now.

glothriel commented 1 year ago

Closing then, feel free to reopen if the problem re-occurs.