Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When I import Google`s UniversalMusicPlayer to my android studio, it crashed

I am a newcomer who want to learn android.My friend suggested me to read the code of that 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 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)

Well,when I searched for answers,the responses were not useful... And if you have some wonderful open source project to recommend ,hope you can tell me.Thx. Sorry for my poor english...

like image 811
Cleven Avatar asked Oct 30 '22 15:10

Cleven


1 Answers

You need to update your google play service of device.

You can see this Bug report which already has been addressed

and possibility you will have to update your gcm dependency then appropriate modifications of code will also required mean the deprecated methods will be needed to replaced with new one in the project for e.g GoogleApiAvailability to register token etc so also make sure you are using the latest gcm dependency in your project

like image 89
Pavneet_Singh Avatar answered Nov 15 '22 07:11

Pavneet_Singh