Android调用摄像头闪退
使用《第一行代码Android》一书中调用摄像头的代码时会闪退
原因在
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.launcher.cameramen.fierier"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
把 android:name="android.support.v4.content.FileProvider"改为
android:name="androidx.core.content.FileProvider"就可以了
                    
                
                
            
        
浙公网安备 33010602011771号