When I import Google UniversalMusicPlayer into my android studio, it crashed

I am a newbie who wants to learn Android. My friend suggested I read the code for this player, but when I imported the project and compiled it, it crashed ...

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 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. The local version is 0 and the remote version is 0. at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2448) in android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2510) at android.app.ActivityThread.access $ 1200 (ActivityThread.java:163) in android.app.ActivityThread $ H.handleMessage (ActivityThread.java:1371) on android.os.Handler.dispatchMessage (Handler.java:102) at android.os.Looper.loop (Looper. java: 135) at android.app.ActivityThread.main (ActivityThread.java:5595) in java.lang.reflect.Method.invoke (native method) in java.lang.reflect.Method.invoke (Method.java data72) 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. The local version is 0 and the remote version is 0. at com.google.android.gms.internal.zzni.zzbg (Unknown source) in com.google.android.gms.internal.zzni.zza (Unknown source) in 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) in com.example.android.uamp.ui.BaseActivity.onCreate (BaseActivity.java:49) in com.example.android.uamp.ui.MusicPlayerActivity.onCreate (MusicPlayerActivity.java:57) at android.app.Activity.performCreate (Activity.java:6100) in android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1109) in android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2401) in android.app.ActivityThread .handleLaunchActivity (ActivityThread.java:2510) at android.app.ActivityThread.access $ 1200 (ActivityThread.java:163) in android.app.ActivityThread $ H.handleMessage (ActivityThread.java:1371) on android.os.Handler.dispatchMessage (Handler.java:102) at android .os.Looper.loop (Looper.java:135) at android.app.ActivityThread.main (ActivityThread.java:5595) in java.lang.reflect.Method.invoke (native method) in java.lang.reflect.Method .invoke (Method.java{72) at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:960) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:755) Reason : com.google.android.gms.internal.zzsb $ zza: no acceptable module found. The local version is 0 and the remote version is 0. at com.google.android.gms.internal.zzsb.zza (Unknown source) in com.google.android.gms.internal.zzni.zzbg (Unknown source) in 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) in com.example.android.uamp.ui.ActionBarCastActivity.onCreate (ActionBarCastActivity.java:141) in com.example.android.uamp.ui.BaseActivity.onCreate (BaseActivity.java:49) in com.example .android.uamp.ui.MusicPlayerActivity.onCreate (MusicPlayerActivity.java:57) at android.app.Activity.performCreate (Activity.java:6100) in android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1109) in android. app.ActivityThread.performLaunchActivity (ActivityThread.ja va: 2401) in android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2510) at android.app.ActivityThread.access $ 1200 (ActivityThread.java:163) in 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) in java. lang.reflect.Method.invoke (native method) in java.lang.reflect.Method.invoke (Method.java{72) in com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:960) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:755)

Well, when I was looking for answers, the answers were not useful ... And if you have a wonderful open source project that you recommend, hope you tell me. Thanks. Sorry for my bad english ...

+5
source share
1 answer

You need to update the Google Play device service.

You can see this error report that has already been addressed

and you will need to update the gcm dependency, then appropriate code modifications will be required, since obsolete methods will be required to replace with a new one in the project, for example, GoogleApiAvailability for registering a token, etc., so also make sure that you use the latest gcm dependency in your project

+2
source

Source: https://habr.com/ru/post/1261718/


All Articles