0

Deploying the debug version of an app on the emulator gets me a

com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
    "code": 403,
    "errors": [
            {
                    "domain": "usageLimits",
                    "message": "Access Not Configured. The API (Gmail API) is not enabled for your project. Please use the Google Developers Console to update your configuration.",
                    "reason": "accessNotConfigured",
                    "extendedHelp": "https://console.developers.google.com"
            }
            ],
       "message": "Access Not Configured. The API (Gmail API) is not enabled for your project. Please use the Google Developers Console to update your configuration."
    }

Deploying the same debug apk on a physical device works OK.

What could explain the difference of behavior between the physical device and the emulator with regards to the Google APIs ?

EDIT This seems to be an IntelliJ 14.1 related issue. deploying from the terminal using adb to the emulator, fixes it. If I find out more, I will update this. Thanks for your contributions.

Bruno Grieder
  • 28,128
  • 8
  • 69
  • 101
  • It must be an emulator specific problem - No Google Services, however do you have Any referer allowed? – Skynet Apr 24 '15 at 13:27

2 Answers2

0

Some emulators don't have Google frameworks installed by default. Have you tried with genymotion and this installation? How do you install Google frameworks (Play, Accounts, etc.) on a Genymotion virtual device?

Community
  • 1
  • 1
Javi Martínez
  • 502
  • 4
  • 10
  • Thanks. See my edit above. I have the Google Frameworks installed on the emulator image. Genymotion looks great, but I need SMS access and I am not willing to spend the money at this stage. – Bruno Grieder Apr 24 '15 at 13:51
0

Sorry, I have no reasonable explanation to offer.

Auto-deployment by IntelliJ on the emulator was leading to unpredictable results.

Deploying the debug apk to the emulator manually fixed it and subsequent automated deployment from IntelliJ worked OK.

I guess this is a problem local to my machine.

Bruno Grieder
  • 28,128
  • 8
  • 69
  • 101