Xamarin Forms File Provider not set

后端 未结 6 1557
天命终不由人
天命终不由人 2021-01-04 03:22

I am currently going through the process of Learning Xamarin.Forms. I am currently attempting to implement Camera functions using the Plugin.Media.CrossMedia library.

<
6条回答
  •  南笙
    南笙 (楼主)
    2021-01-04 04:09

    The problem I had was related to case-sensitivity.

    On the line below

    
    

    I erroneously had a single uppercase letter on the line android:authorities="com.myexample.myapp.fileProvider". It should be:

    android:authorities="com.myexample.myapp.fileprovider"  
    

    Or

    android:authorities="${applicationId}.fileprovider"    
    

    The package name and value for android:authorities should be lowercase. Otherwise you will get the error:

    System.ArgumentException: Unable to get file location. This most likely means that the file provider information is not set in your Android Manifest file. Please check documentation on how to set this up in your project.

提交回复
热议问题