No acceptable module found. Local version is 0 and remote version is 0

ChebTS picture ChebTS · Feb 5, 2019 · Viewed 16.2k times · Source

After adding Bitmovin Cast in Android project I get a lot of same issues from different devices.

This solution didn't help.

GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(getContext()) 

- returns 0 (SUCCESS)

But app crashes.

Caused by java.lang.RuntimeException: com.google.android.gms.dynamite.DynamiteModule$LoadingException: No acceptable module found. Local version is 0 and remote version is 0.
       at com.google.android.gms.internal.cast.zze.zzf(Unknown Source:51)
       at com.google.android.gms.internal.cast.zze.zza(Unknown Source:1)
       at com.google.android.gms.cast.framework.CastContext.(Unknown Source:37)
       at com.google.android.gms.cast.framework.CastContext.getSharedInstance(Unknown Source:6)
       at com.bitmovin.player.BitmovinPlayer.(SourceFile:106)
       at com.bitmovin.player.BitmovinPlayer.(SourceFile:82)
       at com.bitmovin.player.BitmovinPlayer.(SourceFile:71)
       at com.bitmovin.player.BitmovinPlayerView.(SourceFile:134)
       at com.bitmovin.player.BitmovinPlayerView.(SourceFile:120)

So, Google Play services version is ok.

Answer

ChebTS picture ChebTS · Feb 5, 2019

According to this article code like this can help:

fun isCastApiAvailable(): Boolean {
    val isCastApiAvailable = isNotTv(context)
            && GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context) == ConnectionResult.SUCCESS
    try {
        CastContext.getSharedInstance(context)
    } catch (e: Exception) {
        // track non-fatal
        return false
    }
    return isCastApiAvailable
}

But in my case, this is Bitmovin issue