0

I am using Content Providers in Android for fetching data from rest API, and after upgrade to API level 26 I am getting "java.lang.SecurityException: Failed to find provider mobileservices.host.com for user 0; expected to find a valid ContentProvider for this authority".

It is not possible for me to replace the given Mechanism for handling rest API's due to app architecture.

It will be great if someone can help me with the way out.

Thanks in Advance.

  • It seems you have the same problem as described in https://stackoverflow.com/questions/45925380/securityexception-failed-to-find-provider-null-for-user-0-on-activeandroid-on. – Doron Yakovlev Golani Dec 18 '18 at 19:01
  • Possible duplicate of [SecurityException: Failed to find provider null for user 0; on ActiveAndroid on Android 8.0](https://stackoverflow.com/questions/45925380/securityexception-failed-to-find-provider-null-for-user-0-on-activeandroid-on) – Doron Yakovlev Golani Dec 18 '18 at 19:02
  • @DoronYakovlev-Golani, I had already seen this, but I cannot solve this problem adding package name to "Authorities" as Android is asking me to add the "Host name" as an Authority and also there are multiple Host Names used in my app for different environments and they change dynamically at run time. – Pawan Valecha Dec 19 '18 at 09:20

0 Answers0