05/15/2024 15:19:45

Problem description

Android fails to send a big picture and fails to launch WeChat, and an error is reported: "Failed to find configured root that contains /storage/emulated/..."

Solution

1.Check whether there is the 'file_provider_paths' configuration in AndroidManifest.xml, as shown in the figure below.

Image Description

2.Find the file_provider_paths.xml file and modify the configuration content in the xml file.

Image Description

When making configuration, you need to see the access party's question: "Where is the image passed in during sharing placed". You need to add the location to the file_provider_paths.xml file to solve the problem. The detailed configuration description are as follows.

Image Description

-Configuration description:
-Tag: the corresponding path of each Tag in XML. Refer to the following table to configure it as needed

Tag Corresponding path
root-path Root directory /
files-path /data/user/0/<package_name>/files or /data/data/<package_name>/files
These two directories point to the same location
cache-path /data/user/0/<package_name>/cache or /data/data/<package_name>/cache
external-path /storage/emulated/0 or /sdcard/
external-files-path /storage/emulated/0/Android/data/<package_name>/files or /sdcard/Android/data/<package_name>/files
external-cache-path /storage/emulated/0/Android/data/<package_name>/cache or /sdcard/Android/data/<package_name>/cache

-name: fill in any value
-path: it is recommended to fill in a dot (for example, path="."). The tag points to "the root directory of the path corresponding to Tag". If you fill in other user-defined strings (for example, path="test"), the tag points to "the root directory of the path corresponding to Tag/test"



Copyright © 2024 MSDK.
All rights reserved.

results matching ""

    No results matching ""