简体   繁体   English

AdvertisingIdClient:从SharedPreferences读取时出错java.lang.SecurityException:不再支持MODE_WORLD_READABLE

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

I want to integrate adjust SDK on my project but I got this error 我想在我的项目上集成adjust SDK,但是我收到了这个错误

AdvertisingIdClient: Error while reading from SharedPreferences java.lang.SecurityException: MODE_WORLD_READABLE no longer supported AdvertisingIdClient:从SharedPreferences读取时出错java.lang.SecurityException:不再支持MODE_WORLD_READABLE

but I didn't use MODE_WORLD_READABLE anywhere 但我没有在任何地方使用MODE_WORLD_READABLE

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'

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. 我在Android API 28中也遇到了同样的问题。我必须更新app \\ build.gradle文件中的'com.google.android.gms:play-services'和项目中的'com.google.gms:google-services'最新版本的gradle文件。 Hope it helps. 希望能帮助到你。

Reason you are seeing this warning is probably because you are using older version of Google Play Services dependency in your app. 您看到此警告的原因可能是因为您在应用中使用旧版Google Play服务依赖项。 Which version are you using? 你使用的是哪个版本? Give latest version a shot: 给出最新版本:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.lang.SecurityException:不再支持MODE_WORLD_READABLE - java.lang.SecurityException: MODE_WORLD_READABLE no longer supported java.lang.SecurityException:MODE_WORLD_READABLE - java.lang.SecurityException: MODE_WORLD_READABLE 使用MODE_WORLD_READABLE读取pdf时出错? - Error while reading pdf using MODE_WORLD_READABLE? 无法显示资产文件夹中的PDF文件,不再支持MODE_WORLD_READABLE - cannot display PDF file from assets folder as MODE_WORLD_READABLE no longer supported 什么是Android中已弃用的MODE_WORLD_READABLE SharedPreferences的替代品? - What is a replacement of deprecated MODE_WORLD_READABLE SharedPreferences in Android? 具有MODE_PRIVATE,MODE_WORLD_READABLE,MODE_WORLD_WRITABLE的Android SharedPreferences - Android SharedPreferences with MODE_PRIVATE,MODE_WORLD_READABLE,MODE_WORLD_WRITABLE java.lang.SecurityException:权限拒绝:阅读 - java.lang.SecurityException: Permission Denial: reading java.lang.SecurityException: - java.lang.SecurityException: java.lang.SecurityException:权限拒绝错误 - java.lang.SecurityException: Permission Denial ERROR 来自NotificationManager的java.lang.SecurityException? - java.lang.SecurityException from NotificationManager?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM