找不到可接受的模块。本地版本为 0,远程版本为 0

Che*_*bTS 6 android google-play-services android-cast-api google-cast-sdk

在 Android 项目中添加 Bitmovin Cast 后,我​​在不同的设备上遇到了很多相同的问题。

此解决方案没有帮助。

GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(getContext()) 
Run Code Online (Sandbox Code Playgroud)

- 返回 0(成功)

但应用程序崩溃。

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)
Run Code Online (Sandbox Code Playgroud)

所以,谷歌播放服务版本是可以的。

Che*_*bTS 6

根据这篇文章,这样的代码可以提供帮助:

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
}
Run Code Online (Sandbox Code Playgroud)

但就我而言,这是Bitmovin问题


Yul*_*mok 5

这是因为您的设备或模拟器的 Google Play 服务版本已过时。在您的错误正上方,您应该在日志中看到一些内容

Google Play 服务已过期。需要 3264100 但找到了 3225132

只需更新 Google Play 服务即可。

来源https://github.com/googlesamples/android-UniversalMusicPlayer/issues/97

  • 应用程序开发者不可能更新播放服务。答案是最终用户的答案,而不是开发人员的答案。 (5认同)