I want to integrate adjust SDK on my project but I got this error

AdvertisingIdClient: Error while reading from SharedPreferences java.lang.SecurityException: MODE_WORLD_READABLE no longer supported

but I didn't use MODE_WORLD_READABLE anywhere

here my code

    String appToken = getString(R.string.adjust_token);
    String environment = AdjustConfig.ENVIRONMENT_PRODUCTION;
    AdjustConfig config = new AdjustConfig(this, appToken, environment);
    config.setLogLevel(LogLevel.VERBOSE);
    Adjust.onCreate(config);
    registerActivityLifecycleCallbacks(new AdjustLifecycleCallbacks());

here my gradle

  compile 'com.adjust.sdk:adjust-android:4.14.0'
compile 'com.android.installreferrer:installreferrer:1.0'
2

There are 2 best solutions below

0
On

Reason you are seeing this warning is probably because you are using older version of Google Play Services dependency in your app. Which version are you using? Give latest version a shot:

implementation 'com.google.android.gms:play-services-analytics:16.0.5'
0
On

I was also facing the same issue in android API 28. I had to update 'com.google.android.gms:play-services' in app\build.gradle file and 'com.google.gms:google-services' in project gradle file with latest releases. Hope it helps.