gpt4 book ai didi

android - 当我将 Google 的 UniversalMusicPlayer 导入我的 android studio 时,它崩溃了

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:01:20 25 4
gpt4 key购买 nike

我是一个想学android的新手, friend 建议我看那个播放器的代码,但是导入工程编译的时候就闪退了...

12-22 20:58:07.755 4870-4870/com.example.android.uamp E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.android.uamp, PID: 4870 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.uamp/com.example.android.uamp.ui.MusicPlayerActivity}: java.lang.RuntimeException: com.google.android.gms.internal.zzsb$zza: No acceptable module found. Local version is 0 and remote version is 0. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2448) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510) at android.app.ActivityThread.access$1200(ActivityThread.java:163) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1371) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5595) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) Caused by: java.lang.RuntimeException: com.google.android.gms.internal.zzsb$zza: No acceptable module found. Local version is 0 and remote version is 0. at com.google.android.gms.internal.zzni.zzbg(Unknown Source) at com.google.android.gms.internal.zzni.zza(Unknown Source) at com.google.android.gms.cast.framework.CastContext.(Unknown Source) at com.google.android.gms.cast.framework.CastContext.getSharedInstance(Unknown Source) at com.example.android.uamp.ui.ActionBarCastActivity.onCreate(ActionBarCastActivity.java:141) at com.example.android.uamp.ui.BaseActivity.onCreate(BaseActivity.java:49) at com.example.android.uamp.ui.MusicPlayerActivity.onCreate(MusicPlayerActivity.java:57) at android.app.Activity.performCreate(Activity.java:6100) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1109) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510) at android.app.ActivityThread.access$1200(ActivityThread.java:163) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1371) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5595) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) Caused by: com.google.android.gms.internal.zzsb$zza: No acceptable module found. Local version is 0 and remote version is 0. at com.google.android.gms.internal.zzsb.zza(Unknown Source) at com.google.android.gms.internal.zzni.zzbg(Unknown Source) at com.google.android.gms.internal.zzni.zza(Unknown Source) at com.google.android.gms.cast.framework.CastContext.(Unknown Source) at com.google.android.gms.cast.framework.CastContext.getSharedInstance(Unknown Source) at com.example.android.uamp.ui.ActionBarCastActivity.onCreate(ActionBarCastActivity.java:141) at com.example.android.uamp.ui.BaseActivity.onCreate(BaseActivity.java:49) at com.example.android.uamp.ui.MusicPlayerActivity.onCreate(MusicPlayerActivity.java:57) at android.app.Activity.performCreate(Activity.java:6100) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1109) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510) at android.app.ActivityThread.access$1200(ActivityThread.java:163) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1371) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5595) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

嗯,当我搜索答案时,回复没有用...如果你有一些很棒的开源项目可以推荐,希望你能告诉我。谢谢。抱歉我的英语不好...

最佳答案

您需要更新设备的 google play 服务。

可以看到这个Bug report已经解决了

并且您可能必须更新您的 gcm 依赖项,然后还需要对代码进行适当的修改,这意味着需要用项目中的新方法替换已弃用的方法,例如 GoogleApiAvailability 注册 token 等,因此还要确保您在项目中使用最新的 gcm 依赖项

关于android - 当我将 Google 的 UniversalMusicPlayer 导入我的 android studio 时,它崩溃了,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41283917/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com