에서 다음 기능을 실행할 때 프로그램은 예외가 발생 다음 예외가 발생했습니다java.net.SocketException의 :에 recvfrom 실패 : ECONNRESET을 폰갭의 FileTransfer
testDownloadFunc: function() {
console.log("testDownload");
var remoteFile = "http://192.168.55.177/MvcApplication6/Download/getFile";
var localFileName = "Test01.properties";
function fail(error) {
console.log(error.code);
}
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem) {
fileSystem.root.getFile(localFileName, {create: true, exclusive: false}, function(fileEntry) {
var localPath = fileEntry.fullPath;
if (device.platform === "Android" && localPath.indexOf("file://") === 0) {
localPath = localPath.substring(7);
}
var ft = new FileTransfer();
ft.download(remoteFile,
localPath, function(entry) {
console.log("download complete: " + entry.fullPath);
}, fail);
}, fail);
}, fail);
}
: 02-01 16시 1분를 : 16.920 : E/FileTransfer (23147) : { "target": "/storage/sdcard0/Test01.properties", "source": "http://192.168.55.177/MvcApplication6/Download/getFile", "http_status" : 200, "code": 3} 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : java.net.SocketException : recvfrom 실패 : ECONNRESET (동료에 의한 연결 재설정) 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : libcore.io.IoBridge.maybeThrowAfterRecvfrom (IoBridge.java:552) 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : libcore. io.IoBridge.recvfrom (IoBridge.java:516) 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : 에서 java.net.PlainSocketImpl.read (PlainSocketImpl.java:488) 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : java.net.PlainSocketImpl.access $ 000 (PlainSocketImpl.java:46) 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : java. net.PlainSocketImpl $ PlainSocketInputStream.read (PlainSocketImpl.java:240) 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : 에서 java.io.BufferedInputStream.read (BufferedInputStream.java:304) 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : libcore.net.http.ChunkedInputStream.read (ChunkedInputStream.java:52) 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : at java.io.InputStream.read (InputStream.java:163) 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : 에서 org.apache.cordova.FileTransfer.download (FileTransfer.java:507) 02-01 02 : 16 : 01 : 16.920 : E/FileTransfer (23147)) : 에서 org.apache.cordova.api.PluginManager $ 1.run (PluginManager.java:231) 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : 에서 java.lang.Thread.run (Thread.java:856) 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : 원인 : libcore.io.ErrnoException : recvfrom 실패 : ECONNRESET (동료에 의한 연결 재설정) 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : libcore.io.Posix.recvfromBytes (기본 메서드) 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : libcore.io.Posix.recvfrom (Posix.java:131) 02 -01 16 : 01 : 16.920 : E/FileTransfer (23147) : libcore.io.BlockGuardOs.recvfrom (BlockGuardOs.java:164) 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : at libcore.io.IoBridge.recvfrom (IoBridge.java:513) 02-01 16 : 01 : 16.920 : E/FileTransfer (23147) : ... 10 더
문제점의 근본 원인은 무엇이며 어떻게 해결합니까? PhoneGap 2.1과 Android 4.1.2를 사용합니다.