4

I’m using FlurryAnalytics-5.5.0.jar. When I initialize Flurry, I receive some errors:

FlurryAgent.setLogEnabled(true);
FlurryAgent.setLogEvents(true);
FlurryAgent.setLogLevel(android.util.Log.ERROR);
FlurryAgent.init(this, FLURRY_ID);

Errors:

Could not find class 'com.flurry.sdk.br', referenced from method com.flurry.sdk.bq.a

and

There is a problem with the Google Play Services library, which is required for Android Advertising ID support. The Google Play Services library should be integrated in any app shipping in the Play Store that uses analytics or advertising.

Can you please advise?

Kara
  • 6,115
  • 16
  • 50
  • 57
iftach barshem
  • 497
  • 5
  • 17
  • The second message is letting you know that you need to add the Google Play Services library to your application. Or at least the advertising part of GPS. – ugo Jun 15 '15 at 23:56

2 Answers2

5

This problem arises because Google Play Services are not property configured. Check that any play-services core dependency is not missing in your project configuration.

In my case, I solved it by adding the following dependency to build.gradle config file (app level):

compile 'com.google.android.gms:play-services-base:8.4.0'

The exact logcat error lines are the following

E/FlurryAgent: GOOGLE PLAY SERVICES EXCEPTION: com.google.android.gms.common.GooglePlayServicesUtil

E/FlurryAgent: There is a problem with the Google Play Services library, which is required for Android Advertising ID support. The Google Play Services library should be integrated in any app shipping in the Play Store that uses analytics or advertising.

and the GooglePlaySercicesUtil class is found in the play-services-base library.

Hope this helps.

See links this and this for more information.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
txedo
  • 956
  • 11
  • 11
  • Even though I have `implementation 'com.google.android.gms:play-services-basement:18.0.0'` , I still see this warning (and even multiple times). What does this warning even mean? Should I be worried? – android developer Jan 25 '22 at 10:34
3

If you're using Proguard, the Flurry guide page tells it is necessary to add the following lines to you proguard config file:

-keep class com.flurry.** { *; }
-dontwarn com.flurry.**
-keepattributes *Annotation*,EnclosingMethod,Signature
-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet, int);
}

# Google Play Services library
-keep class * extends java.util.ListResourceBundle {
    protected Object[][] getContents();
}

-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
    public static final *** NULL;
}

-keepnames @com.google.android.gms.common.annotation.KeepName class *

-keepclassmembernames class * {
    @com.google.android.gms.common.annotation.KeepName *;
}

-keepnames class * implements android.os.Parcelable {
    public static final ** CREATOR;
}

#If you are using the Google Mobile Ads SDK, add the following:
# Preserve GMS ads classes
-keep class com.google.android.gms.ads.** { *;
}
-dontwarn com.google.android.gms.ads.**


#If you are using the InMobi SDK, add the following:
# Preserve InMobi Ads classes
-keep class com.inmobi.** { *;
}
-dontwarn com.inmobi.**
#If you are using the Millennial Media SDK, add the following:
# Preserve Millennial Ads classes
-keep class com.millennialmedia.** { *;
}
-dontwarn com.millennialmedia.**

Also take a look at this answer.

Community
  • 1
  • 1
Edson Menegatti
  • 4,006
  • 2
  • 25
  • 40
  • 1
    I'm not using Proguard – iftach barshem Jun 15 '15 at 13:45
  • At the like there is suggestion to update the "Google Play Services". After updating the error message "There is a problem with the Google Play Services library" is gone! Thanks. The message "Could not find class 'com.flurry.sdk.bp', referenced from method com.flurry.sdk.bq.a" is steel accrue. – iftach barshem Jun 15 '15 at 13:48
  • I'm using Proguard and not using advertisement in my app. how can I resolve it ? Can you show me `gradle` file structure ? – SweetWisher ツ Aug 19 '15 at 07:17
  • I don't have progaurd.cfg file. its just a line `proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'` – SweetWisher ツ Aug 19 '15 at 07:22