更新到jdk 7后,我的应用程序构建开始因此错误而崩溃。没有堆栈痕迹,所以很难弄清楚是什么错误。
起初我发现它通常意味着OOM并且与图像有关。 Picasso将NetworkImageView
更改为ImageView
有所帮助。但是现在我再次将文件上传到服务器时遇到了这个问题。
这是一段代码:
conn = (HttpURLConnection) url.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setRequestMethod("POST");
conn.setRequestProperty("Connection", "Keep-Alive");
conn.setRequestProperty("ENCTYPE", "multipart/form-data");
conn.setRequestProperty("Content-Type", "multipart/form-data;boundary=" + boundary);
conn.setRequestProperty("Cookie", mCookieString);
conn.setRequestProperty("uploaded_file", "image" + mIndex + ".jpg");
OutputStream dos = conn.getOutputStream(); // here is the crash
使用Apache HttpClient
时,结果是相同的
HttpClient client = new DefaultHttpClient();
MultipartEntity entity = new MultipartEntity();
entity.addPart(new StringPart("type", mImageType.code));
entity.addPart(new FilePart("file",
readContent(mImagePath.getContentStream()),
mImagePath.generateFileName(mIndex),
mImagePath.getContentType()));
HttpPost post = new HttpPost(Api.url(Api.Methods.UPLOAD_IMAGE));
post.addHeader(new BasicHeader("Cookie", mCookieString));
post.setEntity(entity);
try {
HttpResponse response = client.execute(post); // crash here
…
} catch (IOException e) {
…
}
日志:
10-21 21:44:44.793 22098-22193/com.drive2 A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 22193 (Thread-7029)
10-21 21:44:44.843 171-171/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-21 21:44:44.843 171-171/? I/DEBUG﹕ Build fingerprint: 'google/occam/mako:4.4.4/KTU84P/1227136:user/release-keys'
10-21 21:44:44.843 171-171/? I/DEBUG﹕ Revision: '11'
10-21 21:44:44.843 171-171/? I/DEBUG﹕ pid: 22098, tid: 22193, name: Thread-7029 >>> com.drive2 <<<
10-21 21:44:44.843 171-171/? I/DEBUG﹕ signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
10-21 21:44:44.953 171-171/? I/DEBUG﹕ r0 00000000 r1 00000000 r2 4b723065 r3 00000009
10-21 21:44:44.953 171-171/? I/DEBUG﹕ r4 00000008 r5 4b723066 r6 00000000 r7 ffffffff
10-21 21:44:44.953 171-171/? I/DEBUG﹕ r8 00000001 r9 00000020 sl 00000009 fp 4b723065
10-21 21:44:44.963 171-171/? I/DEBUG﹕ ip 472e7b34 sp 4dce5460 lr 472dc0b5 pc 40a61fae cpsr 600f0030
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d0 0000000000000000 d1 0000000000000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d2 0000000000000000 d3 0000000000000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d4 bab40e046bf201fc d5 078369f6ac49e38b
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d6 762afdb2066e0a4f d7 13c0670fd2ea880f
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d8 0000000000000000 d9 0000000000000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d10 0000000000000000 d11 0000000000000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d12 0000000000000000 d13 0000000000000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d14 0000000000000000 d15 0000000000000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d16 0000000000000000 d17 0000000000000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d18 4dadc2491e1e278b d19 f8da636cf9db7d0c
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d20 3ff0000000000000 d21 0000000000000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d22 0000000000000000 d23 0000000000000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d24 3f699999a0000000 d25 0000000000000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d26 3ff0000000000000 d27 0000000000000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d28 3f699999a0000000 d29 0000000000000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ d30 0000000000000000 d31 0000000000000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ scr 60000013
10-21 21:44:44.963 171-171/? I/DEBUG﹕ backtrace:
10-21 21:44:44.963 171-171/? I/DEBUG﹕ #00 pc 00026fae /system/lib/libssl.so (SSL_select_next_proto+49)
10-21 21:44:44.963 171-171/? I/DEBUG﹕ #01 pc 000070b1 /system/lib/libjavacrypto.so
10-21 21:44:44.963 171-171/? I/DEBUG﹕ #02 pc 0002f373 /system/lib/libssl.so (ssl_parse_serverhello_tlsext+434)
10-21 21:44:44.963 171-171/? I/DEBUG﹕ #03 pc 00018129 /system/lib/libssl.so (ssl3_get_server_hello+1008)
10-21 21:44:44.963 171-171/? I/DEBUG﹕ #04 pc 00017527 /system/lib/libssl.so (ssl3_connect+566)
10-21 21:44:44.963 171-171/? I/DEBUG﹕ #05 pc 00027d4b /system/lib/libssl.so (SSL_do_handshake+50)
10-21 21:44:44.963 171-171/? I/DEBUG﹕ #06 pc 0000aedd /system/lib/libjavacrypto.so
10-21 21:44:44.963 171-171/? I/DEBUG﹕ #07 pc 0045cf54 /data/dalvik-cache/system@framework@boot.oat
10-21 21:44:44.963 171-171/? I/DEBUG﹕ stack:
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5420 61072760 /data/dalvik-cache/system@framework@boot.oat
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5424 fa171053
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5428 00000002
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce542c 472dbfed /system/lib/libjavacrypto.so
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5430 00000002
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5434 472dbfed /system/lib/libjavacrypto.so
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5438 00000003
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce543c 40a31e64 /system/lib/libcrypto.so
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5440 400aa1b8
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5444 40a31e64 /system/lib/libcrypto.so
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5448 4a1abf98 [anon:libc_malloc]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce544c 4006ce6b /system/lib/libc.so (dlmalloc+4254)
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5450 00000003
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5454 0301d844
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5458 4006bdcd /system/lib/libc.so (dlmalloc)
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce545c 00000003
10-21 21:44:44.963 171-171/? I/DEBUG﹕ #00 4dce5460 40a31e64 /system/lib/libcrypto.so
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5464 4dce54e0 [stack:22193]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5468 4dce54dc [stack:22193]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce546c 4b723065 [anon:libc_malloc]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5470 00000009
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5474 4b723065 [anon:libc_malloc]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5478 4dce54dc [stack:22193]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce547c 4dce54e0 [stack:22193]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5480 4a1abf50 [anon:libc_malloc]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5484 4c838910 [anon:libc_malloc]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5488 00000020
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce548c 00000009
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5490 4b723061 [anon:libc_malloc]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce5494 472dc0b5 /system/lib/libjavacrypto.so
10-21 21:44:44.963 171-171/? I/DEBUG﹕ #01 4dce5498 00000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce549c ffffffff
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54a0 4b72306e [anon:libc_malloc]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54a4 4dce5518 [stack:22193]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54a8 4dce5518 [stack:22193]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54ac 4b723065 [anon:libc_malloc]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54b0 00003374
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54b4 40a6a375 /system/lib/libssl.so (ssl_parse_serverhello_tlsext+436)
10-21 21:44:44.963 171-171/? I/DEBUG﹕ #02 4dce54b8 00000009
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54bc 00000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54c0 40a72634 /system/lib/libssl.so
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54c4 00000000
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54c8 00000001
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54cc 4dce551c [stack:22193]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54d0 4b72306a [anon:libc_malloc]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54d4 4b72306e [anon:libc_malloc]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54d8 4c838910 [anon:libc_malloc]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54dc 4a0fedf0 [anon:libc_malloc]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54e0 40a2fdc0 /system/lib/libcrypto.so
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54e4 4c838910 [anon:libc_malloc]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54e8 00000062
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54ec 4b72300c [anon:libc_malloc]
10-21 21:44:44.963 171-171/? I/DEBUG﹕ 4dce54f0 4b72302f [anon:libc_malloc]
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4dce54f4 40a77190 /system/lib/libssl.so
10-21 21:44:44.974 171-171/? I/DEBUG﹕ ........ ........
10-21 21:44:44.974 171-171/? I/DEBUG﹕ memory near r2:
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723044 2afdb206 ea880f76 c0670fd2 1a000013
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723054 010001ff 000b0000 01000304 00743302
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723064 74680809 312f7074 0000312e 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723074 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723084 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723094 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230a4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230b4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230c4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230d4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230e4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230f4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723104 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723114 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723124 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723134 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ memory near r5:
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723044 2afdb206 ea880f76 c0670fd2 1a000013
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723054 010001ff 000b0000 01000304 00743302
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723064 74680809 312f7074 0000312e 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723074 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723084 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723094 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230a4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230b4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230c4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230d4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230e4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230f4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723104 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723114 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723124 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723134 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ memory near fp:
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723044 2afdb206 ea880f76 c0670fd2 1a000013
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723054 010001ff 000b0000 01000304 00743302
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723064 74680809 312f7074 0000312e 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723074 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723084 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723094 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230a4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230b4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230c4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230d4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230e4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b7230f4 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723104 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723114 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723124 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ 4b723134 00000000 00000000 00000000 00000000
10-21 21:44:44.974 171-171/? I/DEBUG﹕ memory near ip:
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7b14 409c76e1 4098baf9 409bdd21 409bd9c5
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7b24 409be70d 409b69cd 409c1d41 4006f021
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7b34 40a61f7d 4006a7dc 4006a8e0 409d5091
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7b44 40a617f5 400b7927 400583b1 402305b5
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7b54 409ca19d 409c2a49 409c28b5 409c2851
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7b64 409c2dd9 409c4ec9 40081235 409c4ea9
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7b74 409c4f8d 40069c01 4006f415 4006def5
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7b84 402306f5 40a61ff9 40a64f1d 409fcbfd
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7b94 409955f5 409956dd 409fcc45 40998799
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7ba4 4098ea29 4099125d 409fc385 409efef9
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7bb4 409972f5 4099aa5d 409caad9 4099ab01
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7bc4 4098a905 409cb135 409baf01 409bb265
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7bd4 409baa5d 409bac69 409bb09d 409ba9d9
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7be4 409bae8d 409d4f39 409bae99 409bae91
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7bf4 409bad6d 409cc839 409cc73d 409ccb79
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472e7c04 4098bb01 409bb365 409899a1 40994b61
10-21 21:44:44.984 171-171/? I/DEBUG﹕ memory near sp:
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce5440 400aa1b8 40a31e64 4a1abf98 4006ce6b
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce5450 00000003 0301d844 4006bdcd 00000003
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce5460 40a31e64 4dce54e0 4dce54dc 4b723065
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce5470 00000009 4b723065 4dce54dc 4dce54e0
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce5480 4a1abf50 4c838910 00000020 00000009
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce5490 4b723061 472dc0b5 00000000 ffffffff
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce54a0 4b72306e 4dce5518 4dce5518 4b723065
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce54b0 00003374 40a6a375 00000009 00000000
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce54c0 40a72634 00000000 00000001 4dce551c
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce54d0 4b72306a 4b72306e 4c838910 4a0fedf0
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce54e0 40a2fdc0 4c838910 00000062 4b72300c
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce54f0 4b72302f 40a77190 00000020 00001000
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce5500 00001110 40a5312d 4dce5518 4dce5514
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce5510 4c838910 00000001 4a1abf50 4b723052
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce5520 4c838910 00001120 4a1abf50 472dc201
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 4dce5530 00000000 00001120 00001110 40a5252b
10-21 21:44:44.984 171-171/? I/DEBUG﹕ code around pc:
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a61f8c d02c2b00 9f0f9701 21009102 4001f81b
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a61f9c 0801f101 eb0bb1cf eb0b0001 90030508
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a61fac f8162000 f1009000 454c0a01 eb06d109
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a61fbc 4628010a f7e54622 4601ef50 29002001
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a61fcc eb0ad00a 42b80009 eb08d3eb 9a040104
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a61fdc 42912002 e000d3da 99029e03 1c729f01
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a61fec 7832603a b005700a 8ff0e8bd 3178f8d0
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a61ffc 2100600b bf182b00 117cf890 47706011
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a6200c 11a4f8c0 21a8f8c0 bf004770 11acf8c0
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a6201c 21b0f8c0 bf004770 4605b570 f8d54614
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a6202c 460e01bc bf182800 edc6f7e5 f240480a
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a6203c 490a6296 44014478 f7e54620 2101edb2
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a6204c 01bcf8c5 4631b130 f7e54622 2100edf2
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a6205c 41c0f8c5 bd704608 00013a04 ffffb63d
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a6206c 4605b570 f8d54614 460e019c bf182800
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 40a6207c eda2f7e5 f240480a 490a62aa 44014478
10-21 21:44:44.984 171-171/? I/DEBUG﹕ code around lr:
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472dc094 46072121 f7fe4640 6a7aef8c b1646abb
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472dc0a4 000ce88d 46294630 9b084622 ef68f7fe
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472dc0b4 bf142801 20002003 b116e004 6034b10d
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472dc0c4 2003702c 81fce8bd 4604b538 6a05b188
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472dc0d4 f7ffb155 6829ffc3 6d9a6803 46284790
10-21 21:44:44.984 171-171/? I/DEBUG﹕ 472dc0e4 ef6cf7fe 62202000 20012100 616160e1
10-21 21:44:44.994 171-171/? I/DEBUG﹕ 472dc0f4 bd38bd38 6803b508 47906d5a b508bd08
10-21 21:44:44.994 171-171/? I/DEBUG﹕ 472dc104 6dda6803 bd084790 6803b508 47906fda
10-21 21:44:44.994 171-171/? I/DEBUG﹕ 472dc114 b510bd08 f8d46804 47a04084 b40cbd10
10-21 21:44:44.994 171-171/? I/DEBUG﹕ 472dc124 ab04b513 f8536804 f8d42b04 930140c8
10-21 21:44:44.994 171-171/? I/DEBUG﹕ 472dc134 e8bd47a0 b002401c b40c4770 ab04b513
10-21 21:44:44.994 171-171/? I/DEBUG﹕ 472dc144 f8536804 f8d42b04 930140f8 e8bd47a0
10-21 21:44:44.994 171-171/? I/DEBUG﹕ 472dc154 b002401c b40c4770 ab04b513 f8536804
10-21 21:44:44.994 171-171/? I/DEBUG﹕ 472dc164 f8d42b04 930141cc e8bd47a0 b002401c
10-21 21:44:44.994 171-171/? I/DEBUG﹕ 472dc174 b5084770 f8d36803 4790229c b508bd08
10-21 21:44:44.994 171-171/? I/DEBUG﹕ 472dc184 f8d36803 479022ac b510bd08 f8d46804
这里有什么不对?为什么在jdk更新后发生了?还有什么可以打破?
答案 0 :(得分:0)
感谢@ChrisStratton指点我。这是工作代码。 现在我不明白它是如何运作的。
OkHttpClient okHttpClient = new OkHttpClient();
try {
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, null, null);
okHttpClient.setSslSocketFactory(sslContext.getSocketFactory());
} catch (GeneralSecurityException ignored) {
}
// open a URL connection to the Servlet
fileInputStream = mImagePath.getContentStream();
URL url = new URL(Api.url(Api.Methods.UPLOAD_IMAGE));
conn = okHttpClient.open(url); // FIX!!!
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setRequestMethod("POST");