質問編集履歴

2

Logcatを追記しました。

2016/05/24 06:10

投稿

cray
cray

スコア29

test CHANGED
File without changes
test CHANGED
@@ -38,7 +38,9 @@
38
38
 
39
39
  String path = filePath.getAbsolutePath();
40
40
 
41
- Log.d(TAG,"2222222222222222222222222");
41
+ Log.d(TAG,"2222222222222222222222222")
42
+
43
+ Log.d(TAG, "External: " +Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) );
42
44
 
43
45
  FileOutputStream output = null;
44
46
 
@@ -80,59 +82,69 @@
80
82
 
81
83
  ```
82
84
 
83
- 05-24 03:49:39.778 2273-2273/com.example.masa_2.sumple D/MainActivity: 11111111111111111111
84
-
85
- 05-24 03:49:39.778 2273-2273/com.example.masa_2.sumple D/MainActivity: 2222222222222222222222222
86
-
87
- 05-24 03:49:39.778 2273-2273/com.example.masa_2.sumple D/MainActivity: 3333333333333
88
-
89
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple D/MainActivity: 7777777777777777777777
90
-
91
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: java.io.FileNotFoundException: /storage/emulated/0/Download/myfile.jpg: open failed: EACCES (Permission denied)
92
-
93
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at libcore.io.IoBridge.open(IoBridge.java:452)
94
-
95
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:87)
96
-
97
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:127)
98
-
99
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:116)
100
-
101
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at com.example.masa_2.sumple.MainActivity.saveToFile(MainActivity.java:167)
102
-
103
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at com.example.masa_2.sumple.MainActivity$2.onPostExecute(MainActivity.java:88)
104
-
105
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at com.example.masa_2.sumple.MainActivity$2.onPostExecute(MainActivity.java:72)
106
-
107
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at android.os.AsyncTask.finish(AsyncTask.java:651)
108
-
109
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at android.os.AsyncTask.-wrap1(AsyncTask.java)
110
-
111
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
112
-
113
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
114
-
115
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at android.os.Looper.loop(Looper.java:148)
116
-
117
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
118
-
119
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at java.lang.reflect.Method.invoke(Native Method)
120
-
121
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
122
-
123
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
124
-
125
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
126
-
127
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at libcore.io.Posix.open(Native Method)
128
-
129
- 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
130
-
131
- 05-24 03:49:39.780 2273-2273/com.example.masa_2.sumple W/System.err: at libcore.io.IoBridge.open(IoBridge.java:438)
132
-
133
- 05-24 03:49:39.780 2273-2273/com.example.masa_2.sumple W/System.err: ... 15 more
134
-
135
- 05-24 03:49:40.909 2273-2273/com.example.masa_2.sumple I/Choreographer: Skipped 44 frames! The application may be doing too much work on its main thread.
85
+ 05-24 06:09:12.145 2621-2621/com.example.masa_2.sumple D/MainActivity: 11111111111111111111
86
+
87
+ 05-24 06:09:12.145 2621-2621/com.example.masa_2.sumple D/MainActivity: 2222222222222222222222222
88
+
89
+ 05-24 06:09:12.146 2621-2621/com.example.masa_2.sumple D/MainActivity: External: /storage/emulated/0/Download
90
+
91
+ 05-24 06:09:12.146 2621-2621/com.example.masa_2.sumple D/MainActivity: 3333333333333
92
+
93
+ 05-24 06:09:12.147 2621-2621/com.example.masa_2.sumple D/MainActivity: 7777777777777777777777
94
+
95
+ 05-24 06:09:12.147 2621-2621/com.example.masa_2.sumple W/System.err: java.io.FileNotFoundException: /storage/emulated/0/Download/myfile.jpg: open failed: EACCES (Permission denied)
96
+
97
+ 05-24 06:09:12.147 2621-2621/com.example.masa_2.sumple W/System.err: at libcore.io.IoBridge.open(IoBridge.java:452)
98
+
99
+ 05-24 06:09:12.147 2621-2621/com.example.masa_2.sumple W/System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:87)
100
+
101
+ 05-24 06:09:12.147 2621-2621/com.example.masa_2.sumple W/System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:127)
102
+
103
+ 05-24 06:09:12.147 2621-2621/com.example.masa_2.sumple W/System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:116)
104
+
105
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: at com.example.masa_2.sumple.MainActivity.saveToFile(MainActivity.java:168)
106
+
107
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: at com.example.masa_2.sumple.MainActivity$2.onPostExecute(MainActivity.java:88)
108
+
109
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: at com.example.masa_2.sumple.MainActivity$2.onPostExecute(MainActivity.java:72)
110
+
111
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: at android.os.AsyncTask.finish(AsyncTask.java:651)
112
+
113
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: at android.os.AsyncTask.-wrap1(AsyncTask.java)
114
+
115
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
116
+
117
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
118
+
119
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: at android.os.Looper.loop(Looper.java:148)
120
+
121
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
122
+
123
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: at java.lang.reflect.Method.invoke(Native Method)
124
+
125
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
126
+
127
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
128
+
129
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
130
+
131
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: at libcore.io.Posix.open(Native Method)
132
+
133
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
134
+
135
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: at libcore.io.IoBridge.open(IoBridge.java:438)
136
+
137
+ 05-24 06:09:12.148 2621-2621/com.example.masa_2.sumple W/System.err: ... 15 more
138
+
139
+ 05-24 06:09:13.184 2621-2621/com.example.masa_2.sumple I/Choreographer: Skipped 38 frames! The application may be doing too much work on its main thread.
140
+
141
+ 05-24 06:09:13.846 1646-1836/system_process W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=0 for 319ms
142
+
143
+ 05-24 06:09:14.209 1646-1836/system_process W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=0 for 362ms
144
+
145
+ 05-24 06:09:14.579 1646-1836/system_process W/art: Long monitor contention event with owner method=void com.android.server.wm.WindowAnimator$1.doFrame(long) from WindowAnimator.java:121 waiters=0 for 370ms
146
+
147
+
136
148
 
137
149
 
138
150
 

1

Logcatを追記しました。String path = filePath\.getAbsolutePath\(\);に変更しました。

2016/05/24 06:10

投稿

cray
cray

スコア29

test CHANGED
File without changes
test CHANGED
@@ -36,7 +36,7 @@
36
36
 
37
37
  Log.d(TAG,"11111111111111111111");
38
38
 
39
- String path = filePath.getPath();
39
+ String path = filePath.getAbsolutePath();
40
40
 
41
41
  Log.d(TAG,"2222222222222222222222222");
42
42
 
@@ -74,6 +74,72 @@
74
74
 
75
75
 
76
76
 
77
+
78
+
79
+ ###Logcat
80
+
81
+ ```
82
+
83
+ 05-24 03:49:39.778 2273-2273/com.example.masa_2.sumple D/MainActivity: 11111111111111111111
84
+
85
+ 05-24 03:49:39.778 2273-2273/com.example.masa_2.sumple D/MainActivity: 2222222222222222222222222
86
+
87
+ 05-24 03:49:39.778 2273-2273/com.example.masa_2.sumple D/MainActivity: 3333333333333
88
+
89
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple D/MainActivity: 7777777777777777777777
90
+
91
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: java.io.FileNotFoundException: /storage/emulated/0/Download/myfile.jpg: open failed: EACCES (Permission denied)
92
+
93
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at libcore.io.IoBridge.open(IoBridge.java:452)
94
+
95
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:87)
96
+
97
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:127)
98
+
99
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:116)
100
+
101
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at com.example.masa_2.sumple.MainActivity.saveToFile(MainActivity.java:167)
102
+
103
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at com.example.masa_2.sumple.MainActivity$2.onPostExecute(MainActivity.java:88)
104
+
105
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at com.example.masa_2.sumple.MainActivity$2.onPostExecute(MainActivity.java:72)
106
+
107
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at android.os.AsyncTask.finish(AsyncTask.java:651)
108
+
109
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at android.os.AsyncTask.-wrap1(AsyncTask.java)
110
+
111
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
112
+
113
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
114
+
115
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at android.os.Looper.loop(Looper.java:148)
116
+
117
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
118
+
119
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at java.lang.reflect.Method.invoke(Native Method)
120
+
121
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
122
+
123
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
124
+
125
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
126
+
127
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at libcore.io.Posix.open(Native Method)
128
+
129
+ 05-24 03:49:39.779 2273-2273/com.example.masa_2.sumple W/System.err: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
130
+
131
+ 05-24 03:49:39.780 2273-2273/com.example.masa_2.sumple W/System.err: at libcore.io.IoBridge.open(IoBridge.java:438)
132
+
133
+ 05-24 03:49:39.780 2273-2273/com.example.masa_2.sumple W/System.err: ... 15 more
134
+
135
+ 05-24 03:49:40.909 2273-2273/com.example.masa_2.sumple I/Choreographer: Skipped 44 frames! The application may be doing too much work on its main thread.
136
+
137
+
138
+
139
+ ```
140
+
141
+
142
+
77
143
  ###試したこと
78
144
 
79
145
  Log.dでどこまで実行されているのかを調べました。