Camera is not working in Nougat 7.0

后端 未结 4 1616
感动是毒
感动是毒 2021-02-15 12:25

My camera code is working in all Android versions but in Nougat 7.0 it gives the following error:

java.lang.NullPointerException: Attempt to invoke virtual meth         


        
4条回答
  •  有刺的猬
    2021-02-15 12:36

    This might be related to the change in Nougat which doesn't allow "file://" scheme to be attached to an intent.

    Check out this blogpost for more details

    https://inthecheesefactory.com/blog/how-to-share-access-to-file-with-fileprovider-on-android-nougat/en

提交回复
热议问题