Adding a Cloud Endpoints Module

This page shows you how to add a Cloud Endpoints module to your project in Android Studio.

To add the module:

  1. Start Android Studio and open the project for the Android app that needs the new backend.

    If you have not installed Android Studio or set up your environment yet, see the Quickstart for details.

  2. Right-click on your project and select New > Module.

  3. Select Google Cloud Module from the list and then click Next.

  4. Select App Engine Java Endpoints Module, and then supply the remaining information in the New Google Cloud Module form:

    Enter module parameters
    1. Supply a module name for your backend; this name will be displayed and used in your Android Studio project.

    2. Supply a package name. This package name will be used for all classes imported from this template.

    3. Select the client module (containing your Android app) in this project. This module will be automatically set up to have the right compile and build dependencies to be able to call your newly generated backend.

    4. Click Finish to generate the new backend.

  5. Select Tools > Android > Sync Project with Gradle Files to sync the project.

At this point, you've created a new buildable and runnable backend module for your Android Studio project and added it as an additional dependency in your project's settings.gradle file.

In particular, a new Gradle module with your specified module/package name has been added to your project containing your new backend. All of the required dependencies/permissions have been automatically set up for you.

Using the module

For detailed instructions on how to connect your Android app to the backend, how to debug and test locally, and how to deploy, see the appropriate README in the GitHub repository:

Suggesting changes or enhancing the backend module templates

If you want to make suggestions to improve or enhance these templates, visit the GitHub repository and submit a pull request.

What's next

Send feedback about...

Cloud Tools for Android Studio