我開發了一個應用程序併發布在playstore上。Android登錄無法正常工作獲取filenotfount例外
直到yestarday的CheckLogin Servlet的工作方式登錄工作文件,但
從今天mornning它不工作
我得到以下異常
02-27 14:43:23.462 32275-6622/com.dhruva.eprintpost W/System.err: java.io.FileNotFoundException: path of URL
02-27 14:43:23.463 32275-6622/com.dhruva.eprintpost W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:238)
02-27 14:43:23.463 32275-6622/com.dhruva.eprintpost W/System.err: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
02-27 14:43:23.463 32275-6622/com.dhruva.eprintpost W/System.err: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java)
02-27 14:43:23.463 32275-6622/com.dhruva.eprintpost W/System.err: at com.dhruva.eprintpost.login.LoginActivity$10.run(LoginActivity.java:513)
02-27 14:43:23.463 32275-6622/com.dhruva.eprintpost W/System.err: at java.lang.Thread.run(Thread.java:818)
和我的登錄發送請求如下
new Thread(new Runnable() {
public void run() {
try {
URL url = new URL(SessionManager.getAmateurPath() + "LoginCheck");
Log.v("Urllll",""+url);
URLConnection connection = url.openConnection();
ComStr = "&usrnm=" + email + "&pwd=" + pwd;
str = ComStr.getBytes();
Log.d("inputString", email);
Log.d("inputString", pwd);
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setRequestProperty("Content=length", String.valueOf(str.length));
os = connection.getOutputStream();
os.write(str);
os.flush();
final String status;
final BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
status = in.readLine();
Log.d("Status", status);
runOnUiThread(new Runnable() {
@Override
public void run() {
handleStatus(status, in);
}
});
}
catch (Exception e) {
e.printStackTrace();
}
}
}).start();
檢查。 –
Checket,但它不工作。 –
文件存在server.I從瀏覽器中打開該網址與它在鉻中工作的相應參數 –