Android - cannot resolve FileProvider character

I am trying to test a file system tutorial.

He asks to include in the manifest:

<provider
    android:name="android.support.v4.content.FileProvider"
    android:authorities="com.mydomain.fileprovider"
    android:exported="false"
    android:grantUriPermissions="true">
</provider>

In the manifest, I get an error:

 Cannot resolve symbol FileProvider

I followed these instructions to add the v4 support library in Android Studio. I add the following to the build.gradle file, but gradle fails:

 compile "com.android.support:support-v4:18.0.+"

What should I do to solve this problem?

+4
source share
2 answers

Go to File> Invalid Caches / Restart and Invalid and Restart.

0
source

, (18.0. +) . FileProvider 22.1.0 , :

compile "com.android.support:support-v4:22.1.0"
0

Source: https://habr.com/ru/post/1543775/


All Articles