回答編集履歴

3

改行修正

2019/11/22 17:18

投稿

jimbe
jimbe

スコア12632

test CHANGED
@@ -34,9 +34,7 @@
34
34
 
35
35
 
36
36
 
37
- ```val filePath = File(applicationContext.filesDir,
37
+ ```val filePath = File(applicationContext.filesDir, targetPdf)```
38
-
39
- targetPdf)```
40
38
 
41
39
 
42
40
 

2

修正

2019/11/22 17:17

投稿

jimbe
jimbe

スコア12632

test CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  File に渡すのはパスであってURIではありません.
24
24
 
25
- targetPdf をどう追加して試されたのか分かりませんが,
25
+ targetPdf をどう追加して試されたのか分かりませんが, 私が引用した状態から
26
26
 
27
27
 
28
28
 
@@ -34,9 +34,9 @@
34
34
 
35
35
 
36
36
 
37
- val filePath = File(applicationContext.filesDir ,
37
+ ```val filePath = File(applicationContext.filesDir,
38
38
 
39
- targetPdf)
39
+ targetPdf)```
40
40
 
41
41
 
42
42
 

1

追加

2019/11/21 18:16

投稿

jimbe
jimbe

スコア12632

test CHANGED
@@ -11,3 +11,33 @@
11
11
  ```
12
12
 
13
13
  targetPdf が使用されておらず, filePath はフォルダ名までなのではないでしょうか.
14
+
15
+
16
+
17
+ ---
18
+
19
+
20
+
21
+ 見落としていました.
22
+
23
+ File に渡すのはパスであってURIではありません.
24
+
25
+ targetPdf をどう追加して試されたのか分かりませんが,
26
+
27
+
28
+
29
+ > val filePath = File(applicationContext.filesDir.toURI().toString())
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+ val filePath = File(applicationContext.filesDir ,
38
+
39
+ targetPdf)
40
+
41
+
42
+
43
+ としてみてください.