回答編集履歴
3
改行修正
answer
CHANGED
@@ -16,7 +16,6 @@
|
|
16
16
|
|
17
17
|
を
|
18
18
|
|
19
|
-
```val filePath = File(applicationContext.filesDir,
|
19
|
+
```val filePath = File(applicationContext.filesDir, targetPdf)```
|
20
|
-
targetPdf)```
|
21
20
|
|
22
21
|
としてみてください.
|
2
修正
answer
CHANGED
@@ -10,13 +10,13 @@
|
|
10
10
|
|
11
11
|
見落としていました.
|
12
12
|
File に渡すのはパスであってURIではありません.
|
13
|
-
targetPdf をどう追加して試されたのか分かりませんが,
|
13
|
+
targetPdf をどう追加して試されたのか分かりませんが, 私が引用した状態から
|
14
14
|
|
15
15
|
> val filePath = File(applicationContext.filesDir.toURI().toString())
|
16
16
|
|
17
17
|
を
|
18
18
|
|
19
|
-
val filePath = File(applicationContext.filesDir
|
19
|
+
```val filePath = File(applicationContext.filesDir,
|
20
|
-
targetPdf)
|
20
|
+
targetPdf)```
|
21
21
|
|
22
22
|
としてみてください.
|
1
追加
answer
CHANGED
@@ -4,4 +4,19 @@
|
|
4
4
|
try {
|
5
5
|
document.writeTo(FileOutputStream(filePath))
|
6
6
|
```
|
7
|
-
targetPdf が使用されておらず, filePath はフォルダ名までなのではないでしょうか.
|
7
|
+
targetPdf が使用されておらず, filePath はフォルダ名までなのではないでしょうか.
|
8
|
+
|
9
|
+
---
|
10
|
+
|
11
|
+
見落としていました.
|
12
|
+
File に渡すのはパスであってURIではありません.
|
13
|
+
targetPdf をどう追加して試されたのか分かりませんが,
|
14
|
+
|
15
|
+
> val filePath = File(applicationContext.filesDir.toURI().toString())
|
16
|
+
|
17
|
+
を
|
18
|
+
|
19
|
+
val filePath = File(applicationContext.filesDir ,
|
20
|
+
targetPdf)
|
21
|
+
|
22
|
+
としてみてください.
|