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

问题描述 投票:1回答:2

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

This解决方案没有帮助。

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

-返回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)

因此,Google Play服务版本可以。

android google-play-services google-cast-sdk android-cast-api
2个回答
3
投票

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

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
}

但是就我而言,这是Bitmovin问题


0
投票

这是因为您的设备或模拟器都具有过时的Google Play服务版本。在您的错误上方,您应该在日志猫中看到以下内容:

Google Play服务已过时。需要3264100,但找到3225132

只需更新Google Play服务即可使用。

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

© www.soinside.com 2019 - 2024. All rights reserved.