java.lang.IllegalArgumentException: index 0 处的方案中的非法字符: localhost
2022-09-03 03:23:53
我正在开发一个Android应用程序,该应用程序从服务器(localhost - mssql和nodejs)接收数据,保存数据,然后显示它
收到服务器响应后,我收到此错误
我按照下面的说明在这里输入链接描述,而不是我使用的Web服务器本地主机。谢谢
Illegal character in scheme at index 0: 192.168.2.7:3000
java.net.URISyntaxException: Illegal character in scheme at index 0: 192.168.2.7:3000
at java.net.URI.validateScheme(URI.java:419)
at java.net.URI.parseURI(URI.java:363)
at java.net.URI.<init>(URI.java:204)
at cz.uhk.fim.jedlima3.searchrooms.asyncTask.DownloadDatabaseAsync.doInBackground(DownloadDatabaseAsync.java:30)
at cz.uhk.fim.jedlima3.searchrooms.asyncTask.DownloadDatabaseAsync.doInBackground(DownloadDatabaseAsync.java:15)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:864)