GCM Demo "Unfortunately, GCM demo has stopped"

Source: Internet
Author: User

This article link: http://blog.csdn.net/kongxx/article/details/8155913


Today in the study of Google Cloud Messaging (GCM), use examples in running documents (http://developer.android.com/guide/google/gcm/ demo.html), according to the steps set up server and client, after running server and client, in the simulator running GCM demo always appear "Unfortunately, GCM demo has stopped" Error, checked, and need to modify the place to follow the instructions on the document changed, or error. Finally found that the original choice of AVD has a problem, began to use the "Android 4.1.2-api level 16", and then I replaced AVD "Google APIs (Google Inc.)-API level 16" and then run the client, will not appear on the Face of the problem.


In addition, a problem was found in the test, that is, the document gives two kinds of server choices, one is "using a standard Web server", when using this server selection, configure the client according to the instructions on the document can be run. However, if you use the "using APP Engine for Java", you need to change the Commonutilities.server_url in the client to "http://192.168.1.10:8080" to remove the "/ Gcm-demo, and then run, and you can send the message via "http://192.168.1.10:8080".


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.