我创建了一个应用引擎连接的 android 项目。目前我已经将我的后端(端点 api)部署到应用引擎。现在我想将 android 应用程序 (apk) 指向在线服务器/api。我怎么做?
基本上,以下是我所要做的吗?
protected static final boolean LOCAL_ANDROID_RUN = false;
当上面的行是我所做的一切时,我得到了例外
Exception received from server at https://1.myapi.appspot.com/_ah/api/
java.io.IOException: Hostname '1.myapi.appspot.com' was not verified
at libcore.net.http.HttpConnection.verifySecureSocketHostname(HttpConnection.java:224)
at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:446)
at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:289)
at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:239)
at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:80)
at libcore.net.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:188)
at libcore.net.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:281)
at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:78)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:980)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:412)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:345)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:463)
1
为什么我的app-id前面有一个是正常的?那是问题吗?我在哪里修?同样,我的项目完全是使用 GEP 生成的。