0

I am currently trying to work with GoogleAPI Clients.

I've recently had trouble with my app reaching the GC Overhead limit, so I've replaced

com.google.android.gms:play-services

with the relevant play services sectors:

com.google.android.gms:play-services-location:9.2.0
com.google.android.gms:play-services-drive:9.2.0

However, apparently I require the entirety of the play services API to import ConnectionResult for my GooglePlayClient.

Is there any alternatives for ConnectionResult for my GooglePlayClient?

Mildwood
  • 349
  • 2
  • 13

1 Answers1

0

In Accessing Google APIs, there are only three guides given.

  • Automatically manage your connection to Google Play services.
  • Perform synchronous and asynchronous API calls to any of the Google Play services.
  • Manually manage your connection to Google Play services in those rare cases where this is necessary.

As stated in the documentation,

In almost all cases, automatically managed connection is the best and easiest way to connect to Google APIs from your Android app.

However, there are some situations where you would want to use a manually managed connection to Google APIs in your app, like what you have opted to do. But, in using this, you might also need to selectively compile APIs into your executable.

So, if you're using Eclipse, to avoid reaching the GC Overhead limit, you can try to increase your Xms and Xmx values in eclipse.ini. If your default is -Xms40m -Xmx384m, try changing them both to -Xms512m -Xmx512m then restart eclipse and see if that helps.

Solutions given in these SO posts - Can not run project after adding google play services to project and GC overhead limit exceeded with google play services might also help.

Community
  • 1
  • 1
Teyam
  • 7,686
  • 3
  • 15
  • 22