Android:FileProvider IllegalArgumentException无法find包含/data/data/**/files/Videos/final.mp4的configuration根目录

我正在尝试使用FileProvider从私有path播放video

 java.lang.IllegalArgumentException: Failed to find configured root that contains /data/data/XXXXX(Package)/files/Videos/final.mp4 

码:

 <paths> <files-path path="my_docs" name="Videos/" /> </paths> 

Java代码:

 File imagePath = new File(getFilesDir(), "Videos"); File newFile = new File(imagePath, "final.mp4"); Log.d(TAG, "-------------newFile:"+newFile.exists());//True here //Exception in below line Uri contentUri = FileProvider.getUriForFile(this,"com.wow.fileprovider", newFile); 

的Manifest.xml

 <provider android:name="android.support.v4.content.FileProvider" android:authorities="com.wow.fileprovider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" /> 

任何线索呢?

谢谢尼茨

Solutions Collecting From Web of "Android:FileProvider IllegalArgumentException无法find包含/data/data/**/files/Videos/final.mp4的configuration根目录"