Android 在AppEngine端点中使用http代替https以避免SSLHandshakeException
我的问题与相同(所以是的,这是一个重复的程度)。答案是我需要从https改为http。那我该怎么做呢?我正在使用java应用程序引擎 我的Android 在AppEngine端点中使用http代替https以避免SSLHandshakeException,android,google-app-engine,google-cloud-endpoints,sslhandshakeexception,Android,Google App Engine,Google Cloud Endpoints,Sslhandshakeexception,我的问题与相同(所以是的,这是一个重复的程度)。答案是我需要从https改为http。那我该怎么做呢?我正在使用java应用程序引擎 我的web.xml没有任何地方 <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> 要清楚 我可以确认我的代码确实使用了https,我查看
web.xml
没有任何地方
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
要清楚
我可以确认我的代码确实使用了https,我查看生成的源代码并发现:
public Builder(HttpTransport transport, JsonFactory jsonFactory, HttpRequestInitializer httpRequestInitializer) {
super(transport, jsonFactory,
"https://mycompanyserver.appspot.com/_ah/api/", "server/1/",
httpRequestInitializer, false);
}
我只是不知道如何阻止它请求https
我可以通过浏览器访问该站点,因此问题可能是android studio服务器证书
我需要将appengine服务器证书添加到android studio吗?当我进入android studio>Preferences>Server Certificates
时,在Accepted Certificates
下,我会看到N/A>untangle
。如何将我的应用程序引擎证书添加到android studio
既然我添加了我的,为什么它没有自动包含?面临同样的问题。
public Builder(HttpTransport transport, JsonFactory jsonFactory, HttpRequestInitializer httpRequestInitializer) {
super(transport, jsonFactory,
"https://mycompanyserver.appspot.com/_ah/api/", "server/1/",
httpRequestInitializer, false);
}