gpt4 book ai didi

android - 如何在 Android Studio 中将 App Engine 后端设置为 "Run As Web Application"

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:27:34 25 4
gpt4 key购买 nike

我正在使用 Android Studio 创建一个 GCM Android 应用程序并生成一个 App Engine 后端。目前 Android 部分工作正常,但我不明白如何启动后端部分。 This文档描述了在安装了 Google 插件的 Eclipse 中运行方式 -> Web 应用程序的可能性,但是如何在使用 Android Studio 时达到相同的效果?由于生成的应用程序是 Maven 应用程序,我尝试使用 Maven 构建它,然后在本地 Glassfish 服务器上部署 .war 文件——应用程序运行良好,但它无法获取已注册的设备列表,发送消息选项似乎什么都不做。

最佳答案

http://android-developers.blogspot.com/2013/06/adding-backend-to-your-app-in-android.html

  1. Deploy the sample backend server When you're ready to deploy an update to your ( the sample ) production backend in the cloud, you can do that easily from the IDE. Click on the “Maven Projects” button on the right edge of the IDE, under Plugins > App Engine, right-click and run the appengine:update goal.

As soon as the update is deployed, you can also access your endpoints through the APIs Explorer at http://.appspot.com/_ah/api/explorer.

For testing and debugging, you can also run your backend server locally without having to deploy your changes to the production backend. To run the backend locally, just set the value of LOCAL_ANDROID_RUN to true in CloudEndpointUtils.java in the App Engine module.

关于android - 如何在 Android Studio 中将 App Engine 后端设置为 "Run As Web Application",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16811241/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com