Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native React原生Pdf can';t从应用程序自身设置源_React Native_React Native Pdf - Fatal编程技术网

React native React原生Pdf can';t从应用程序自身设置源

React native React原生Pdf can';t从应用程序自身设置源,react-native,react-native-pdf,React Native,React Native Pdf,在我的RN应用程序中,我使用react原生pdf。我想显示应用程序文件系统中的文件。但是当我设置源时,它不起作用,应用程序无法识别路径。如何正确设置路径 <Pdf source={{ uri:'file:///terms.pdf' /> 它应该在下面。当我试着那样做时,它起了作用。在react native pdf的存储库中没有关于这一点的bug。可能您的react native pdf版本存在错误。您应该得到这个版本=>5.1.6 <Pdf source={uri:

在我的RN应用程序中,我使用react原生pdf。我想显示应用程序文件系统中的文件。但是当我设置源时,它不起作用,应用程序无法识别路径。如何正确设置路径

<Pdf
  source={{ uri:'file:///terms.pdf'
/>

它应该在下面。当我试着那样做时,它起了作用。在react native pdf的存储库中没有关于这一点的bug。可能您的react native pdf版本存在错误。您应该得到这个版本=>5.1.6

<Pdf
  source={uri:"file:///absolute/path/to/terms.pdf"}
/>

这里的绝对值/路径/目的地/地点是什么?我不明白。您可以查看此链接: