在 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 服务版本是可以的。
最佳答案
根据 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
}
fun isNotTv(Context context): Boolean {
UiModeManager uiModeManager = (UiModeManager) context.getSystemService(UI_MODE_SERVICE)
return uiModeManager.getCurrentModeType() != Configuration.UI_MODE_TYPE_TELEVISION
}
但就我而言,这是 Bitmovin问题
关于android - 找不到可接受的模块。本地版本为0,远程版本为0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54542514/