Tianium appcelerator createHTTPClient()无法运行Android 5.0棒棒糖

Tianium appcelerator createHTTPClient()无法运行Android 5.0棒棒糖,android,titanium,appcelerator,Android,Titanium,Appcelerator,我用Tianium做了一个简单的GET请求,似乎在android 5.0及以上版本中无法正常工作。这是我收到的控制台的响应 安卓5.0 {“source”:{“password”:null,“status”:0,“username”:null,“autoRedirect”:true,“bubbleParent”:true,“allResponseHeaders”:“location”:“autoEncodeUrl”:true,“apiName”:“Ti.Network.HTTPClient”,“

我用Tianium做了一个简单的GET请求,似乎在android 5.0及以上版本中无法正常工作。这是我收到的控制台的响应

[信息]:状态:200,连接类型:GET

=>安卓5.0

{“source”:{“password”:null,“status”:0,“username”:null,“autoRedirect”:true,“bubbleParent”:true,“allResponseHeaders”:“location”:“autoEncodeUrl”:true,“apiName”:“Ti.Network.HTTPClient”,“responseXML”:null,“validatescurecertificate”:false,“readyState”:1,“domain”:null,“responseText”:“responseData”:null,“connectionType”:“GET”,“statusText”:null,“connected”:false,“_事件”:{“disposehandle”:{}},“error”:“握手” 失败,“代码”:-1,“成功”:false}

错误:握手失败

这是我使用的代码

var url = "MY URL";

        var loader = Titanium.Network.createHTTPClient();

        loader.onload = function() 
        {
            Titanium.API.info('Status: ' + this.status);
            Titanium.API.info('ResponseText: ' + this.responseText);
            Titanium.API.info('connectionType: ' + this.connectionType);
            Titanium.API.info('location: ' + this.location);
        };

        loader.onerror = function (e) {
          console.log(JSON.stringify(e));
          console.log("ERROR: " + JSON.stringify(e.error));
        };

        loader.open("GET",url);
        loader.send();

希望您能在这方面帮助我。

这是Web服务器的SSL证书的问题

您可以从Chrome验证证书是否有效:


如果您使用的是https://url,则请求在Android 5.0及更高版本中无法运行。我所做的是删除S并将其保留为http,但这不是一个永久解决方案,因为可能存在需要https的web服务://