gpt4 book ai didi

java.lang.IllegalArgumentException : Illegal character in scheme at index 0: localhost 异常

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:06:39 25 4
gpt4 key购买 nike

我正在开发一个 android 应用程序,它从服务器(本地主机 - mssql 和 nodejs)接收数据,保存数据然后显示它

收到服务器响应后我得到这个错误

我按照以下说明操作 enter link description here而不是我使用本地主机的网络服务器。谢谢

 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)

最佳答案

您应该从 url 中删除空格并定义方案 httphttps

关于java.lang.IllegalArgumentException : Illegal character in scheme at index 0: localhost 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28114352/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com