1
當我在android API 17上測試NativeScript應用程序時遇到問題。 安裝正常,但是當我嘗試使用HTTP請求登錄到我的HTTPS後端時,請求立即停止。Nativescript應用程序不適用於Android API 17
這隻發生在API 17而不是更高的API上。
Error: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
http.request({
url: config.baseUrl + "login",
method: "POST",
headers: {"Content-Type": "application/x-www-form-urlencoded"},
content: "grant_type=password&username=" + this.username + "&password=" + this.password
});
如果它是https,你不應該請求https嗎? –
可能重複[Trust Anchor Connection找不到Android SSL連接](http://stackoverflow.com/questions/6825226/trust-anchor-not-found-for-android-ssl-connection) –
鏈接的最新評論上面:http://stackoverflow.com/a/16302527/4936697 –