如何为 Android 设置 Google Cloud Messaging? [英] How to setup Google Cloud Messaging for Android?

查看:28
本文介绍了如何为 Android 设置 Google Cloud Messaging?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按照 演示

但我无法执行某些命令,例如 $ ant war,$ android update project --name GCMDemo -p .--target android-16.

But i am unable to execute some command like $ ant war,$ android update project --name GCMDemo -p . --target android-16.

我正在使用 wamp server 并针对 Android 8+

I am using wamp server and targetting Android 8+

任何帮助将不胜感激

推荐答案

如果要执行 $ant war 命令:

  1. 首先,您需要在您的计算机上下载并安装 Apache Ant.
  2. 然后你应该像这里描述的那样配置你的PATH和JAVA_HOME变量(进入安装 Apache Ant"部分).
  3. 只有在此之后,您才能在 Windows 命令行(提示)中执行 ant war 命令.ant war 命令后会创建.war 文件.
  4. 然后你可以在例如 tomcat 服务器上部署和运行你的 .war 文件.(创建Java EE项目,然后下载安装tomcat服务器,配置路径,在tomcat服务器上运行你的项目...)
  1. first you need to download and install Apache Ant on your computer.
  2. Then you should configurate your PATH and JAVA_HOME variables like it is described here (into "Installing Apache Ant" section).
  3. And only after that you can execute ant war command into Windows command line (prompt). After ant war command .war file will be created.
  4. then you can deploy and run your .war file on tomcat server for example. (create Java EE project, then download and install tomcat server, configurate paths, and run your project on tomcat server...)

这篇关于如何为 Android 设置 Google Cloud Messaging?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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