尝试连接 android studio.How 中的 url 时获取文件未找到异常以解决此问题?
Getting file not found exception while trying to connect with url in android studio.How to solve this?
我正在尝试使用 wampp 连接到 mysql,但抛出了以下错误如何解决?
W/System.err: java.io.FileNotFoundException: http://192.168.2.198/login.php
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:250)
at com.example.mysqltest.BackgroundWorker.doInBackground(BackgroundWorker.java:46)
at com.example.mysqltest.BackgroundWorker.doInBackground(BackgroundWorker.java:19)
at android.os.AsyncTask.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor.run(AsyncTask.java:243)
W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
有以下可能出现此问题
- 可能您的项目或文件位置不完美
- 可能是因为端口号或IP不匹配调用时间
- 首先,尝试在您的移动浏览器网络浏览器中 运行 此页面,它会在移动浏览器中运行,然后它会在 API 中运行,如果不能运行,那么您需要更改您的配置
我正在尝试使用 wampp 连接到 mysql,但抛出了以下错误如何解决?
W/System.err: java.io.FileNotFoundException: http://192.168.2.198/login.php
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:250)
at com.example.mysqltest.BackgroundWorker.doInBackground(BackgroundWorker.java:46)
at com.example.mysqltest.BackgroundWorker.doInBackground(BackgroundWorker.java:19)
at android.os.AsyncTask.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor.run(AsyncTask.java:243)
W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
有以下可能出现此问题
- 可能您的项目或文件位置不完美
- 可能是因为端口号或IP不匹配调用时间
- 首先,尝试在您的移动浏览器网络浏览器中 运行 此页面,它会在移动浏览器中运行,然后它会在 API 中运行,如果不能运行,那么您需要更改您的配置