0
votes

I'm developing an android app and I have a problem with Android Studio

I am using Android Studio and I wanted to add the GCM(Google Cloud Messaging) module, so I go to app -> new module -> Google Cloud -> App Engine Backend with GCM, then I click on Finish and Gradle starts synchronizing the project, but it says "Gradle sync failed, basic functionality (compiling, debugging) will not work properly, and in the MainActivity.java, ActionBarActivity symbol cannot be resolved. I fixed the Activity error deleting the module, but I want to add it to my App.

P.S 1: Specs

  • Android Studio v 1.2.1.1
  • Widnows 7 Professional 64 bits
  • Gradle:
    android {
        compileSdkVersion 22
        buildToolsVersion "22.0.1"

defaultConfig {
        applicationId "com.mycompany.myapp"
        minSdkVersion 10
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
1
So do you just want to add GCM to your app or do you want to build the backend as well?timemanx
I think both, I'm trying to make a messaging app where people can sign up. According to Google The backend template employs Google Cloud Endpoints to define a RESTful API which registers Android devices with your GCM server and allows you to send string messages to registered devices.AC_E

1 Answers

0
votes

If ActionBarActivity cannot be found, it is probably because you do not have the Support Library installed. This is somewhat a duplicate question of this.

Go to your SDK Manager on Android Studio and install Android Support Repository and Android Support Library.