[英]'Fluttertoast' is deprecated and shouldn't be used. Will be removed in further release
[英]KMM error: This API is internal in ktor and should not be used. It could be removed or changed without notice
將 Xcode 更新到 13.0 后,我無法運行使用 Kotlin Multiplatform 的 iOS 應用程序。
構建失敗, Command PhaseScriptExecution failed with a nonzero exit code
,它說錯誤是:
任務 :shared:compileKotlinIos 失敗
e: /Users...path.../KtorClient.kt: (134, 17): 此 API 是 ktor 內部的,不應使用。 它可能會被刪除或更改,恕不另行通知。
更新到 Xcode 13 后,我們也遇到了類似的錯誤,但它總是與共享 KMM 庫、JDK 等有關……此錯誤多次顯示:
> Process 'command '/Library/Java/JavaVirtualMachines/jdk-11.0.12.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
KtorClient.kt
134 行:
override suspend fun createPassword(email: String, password: String): CreatePasswordResponse {
return client.post {
url {
path("v1", "user", "create_password")
body = LoginRequest(email, password)
}
headers {
/*134.line*/ append(HttpHeaders.ContentType, ContentType.Application.Json)
}
}
}
我們嘗試刪除XCWorkspace
、 Podfile.lock
、 Pods 文件夾,然后重新安裝 pod,刪除派生數據,沒有任何幫助。
我們也嘗試了不同版本的 Ktor、JDK,都沒有任何幫助。
在互聯網上找到的這個命令也沒有幫助(他們說你應該在更新 Xcode 后運行它):
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.