如何采用Android Studio开发谷歌应用程序引擎的后端 [英] How to develop Google App Engine backend using Android Studio

查看:500
本文介绍了如何采用Android Studio开发谷歌应用程序引擎的后端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想补充谷歌应用程序引擎的功能,我的Andr​​oid应用程序。我使用Android的工作室,并有一看布拉德·艾布拉姆斯谷歌I / O谈话并<一href="http://android-developers.blogspot.com/2013/06/adding-backend-to-your-app-in-android.html">another教程,但Android的工作室似乎已经从那里它是在去年的这个时候移动了,而谷歌云端点的功能已被删除。我可以在GitHub上看到,菜单选项生成App Engine的后端从Android的工作室中删除,并以新App Engine的摇篮模块所取代。

I am trying to add Google App Engine functionality to my Android App. I am using Android Studio, and have had a look at Brad Abrams Google I/O talk and another tutorial, but Android Studio seems to have moved on from where it was at this time last year, and the Google Cloud Endpoints functionality has been removed. I can see at GitHub that the menu option "Generate App Engine Backend" was removed from Android Studio and replaced with "New App Engine Gradle Module".

是否有任何选项,让我产生了App Engine的后端就像从Android的Studio中的例子,或者我需要使用Eclipse来做到这一点?

Are there any options to allow me to generate the App Engine Backend like in those examples from Android Studio, or do I need to use Eclipse to do this?

推荐答案

这答案是基于AndroidStudio 0.8.3。

This answer is based on AndroidStudio 0.8.3.

  1. 选择您的项目的最顶层,右键点击新建>模块,然后选择应用程序引擎的Java端点
  2. 设置的名称为您的模块,如 MyModule的
  3. 您的 build.gradle 文件现在将有一个新行:

  1. Select the top most level of your project, right click New > Module and select App Engine Java Endpoints
  2. set the name for your module, such as mymodule
  3. Your build.gradle file will now have a new line:

编制项目(路径:':MyModule的,配置:Android的终端')

现在你将要打开的 MyModule的/ src目录/主/ web应用/ WEB-INF / AppEngine上-web.xml中和您的应用程序引擎项目号替换myApplicationID 这你可以从 cloud.google.com/console

Now you will want to open mymodule/src/main/webapp/WEB-INF/appengine-web.xml and replace myApplicationID with your appengine PROJECT ID which you can get from cloud.google.com/console

您现在可以任一配置更改为MyModule的(工具栏)和preSS运行。这将启动本地服务器,也可以选择摇篮在窗口的右上方,寻找:MyModule的,然后点击 appengineUpdate appengineUpdateAll

You can now either change the configuration to myModule (toolbar) and press run. It will launch a local server, or you can select Gradle on the upper right hand side of the window and look for :mymodule and click on appengineUpdate or appengineUpdateAll.

<一个href="http://android-developers.blogspot.com/2014/06/new-ways-to-connect-your-app-to-the-cloud-android-studio.html">More这里详细和 GitHub上

这篇关于如何采用Android Studio开发谷歌应用程序引擎的后端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆