Jaz Jaz - 4 months ago 367
Android Question

"No acceptable module found" on Android emulators using com.google.android.gms play-services 9.2.0

I have recently updated to com.google.android.gms:play-services 9.2.0 and am attempting to use the new Chromecast library and Firebase Analytics but am receiving the error "com.google.android.gms.internal.zzsj$zza: No acceptable module found. Local version is 0 and remote version is 0." in the Activity onCreate method at com.google.android.gms.cast.framework.CastContext.(Unknown Source). Any ideas if this is due to the Cast functionality not working with the emulators or if it's a version issue? The emulators I am testing with are running 5.0 and 5.1.

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
setupCastListener();
mCastContext = CastContext.getSharedInstance(this);
mCastSession = mCastContext.getSessionManager().getCurrentCastSession();
mCastContext.getSessionManager().addSessionManagerListener(mSessionManagerListener, CastSession.class);
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
}


Thanks

Answer

The version of Play Services on your emulator does not support 9.2.0. At this time, I don't think any of the emulator images support 9.2.0. Your options are to downgrade to 9.0.2, or run on a real device until an updated emulator image is released.

If you look carefully at your logcat output you should see a message like this:

W/GooglePlayServicesUtil: Google Play services out of date.  Requires 9256000 but found 9080030

You can see the GPS version number the emulator is using by going to Settings/Apps, finding Google Play Services, and tapping on it to get the App Info.

You can get the GPS version number from code by calling GoogleApiAvalability.GOOGLE_PLAY_SERVICES_VERSION_CODE.

This answer contains some related information about emulator versions.

Comments