a new error occurred when Android 7.0 called the camera:
android.os.FileUriExposedException: file:///storage/emulated/0/photo.jpeg exposed beyond app through ClipData.Item.getUri()
solutions:
add the following code to the oncreat() method of application:
// android 7.0 The system solves the problem of taking pictures
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());
builder.detectFileUriExposure();
Similar Posts:
- [How to Solve] Eclipse: Errors occurred during the build
- Android solves the problem of NDK not configured
- [Solved] com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
- Android – Unable to add window — token null is not for an application [How to Solve]
- Android Run App Warning: The application could not be installed: INSTALL_FAILED_TEST_ONLY
- AndroidStudio Cannot fit requested classes in a single dex file (# methods: 72633 > 65536)
- Error parsing XML: junk after document element [How to Solve]
- Android Your content must have a ListView whose…
- [Solved] Android.os.networkonmainthreadexception exception of Android
- How to Solve setSupportActionBar() Method Error