报错堆栈:
java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but no colon was found
at okhttp3.HttpUrl$Builder.parse$okhttp(HttpUrl.kt:1260)
at okhttp3.HttpUrl$Companion.get(HttpUrl.kt:1633)
at okhttp3.HttpUrl.get(Unknown Source:2)
at retrofit2.Retrofit$Builder.baseUrl(Retrofit.java:506)
at cn.leancloud.core.PaasClient.getStorageClient(PaasClient.java:67)
at cn.leancloud.LCQuery.findInBackground(LCQuery.java:955)
at cn.leancloud.LCQuery.findInBackground(LCQuery.java:946)
at cn.leancloud.LCQuery.findInBackground(LCQuery.java:935)
at com.github.haocen2004.login_simulation.data.database.sponsor.SponsorRepo.lambda$refreshSponsors$0$com-github-haocen2004-login_simulation-data-database-sponsor-SponsorRepo(SponsorRepo.java:35)
at com.github.haocen2004.login_simulation.data.database.sponsor.SponsorRepo$$ExternalSyntheticLambda0.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:1012)
debug调试发现cn.leancloud.core.PaasClient#83 String apiHost = appRouter.getEndpoint(LeanCloud.getApplicationId(), LeanService.API).blockingFirst();// donot block current thread. 获取到的apiHost 为空
已确认初始化时传入正确apihost
已在测试环境使用String.copyvalueof进行变量控制
完整代码仓库 https://github.com/HonkaiScanner/bh3_login_simulation/tree/dev