question

Alexandre Chimeno Bort avatar image
Alexandre Chimeno Bort asked

Missing class com.google.android.gms.tasks.Task on AndroidPushPlugin Unity5.0

Hello all,

I am trying to update my Unity game to PlayFab v2. When I build and run the game on Android platform I get the following error on init:

I/Unity   ( 9867): [IsPlayServicesAvailable]

I/Unity   ( 9867):  

I/Unity   ( 9867): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

I/Unity   ( 9867): 

I/Unity   ( 9867): AndroidJavaException: java.lang.NoClassDefFoundError: com.google.android.gms.tasks.Task

I/Unity   ( 9867): java.lang.NoClassDefFoundError: com.google.android.gms.tasks.Task

I/Unity   ( 9867): 	at libcore.reflect.InternalNames.getClass(InternalNames.java:55)

I/Unity   ( 9867): 	at java.lang.Class.getDexCacheType(Class.java:479)

I/Unity   ( 9867): 	at java.lang.reflect.ArtMethod.getDexCacheType(ArtMethod.java:191)

I/Unity   ( 9867): 	at java.lang.reflect.ArtMethod.getReturnType(ArtMethod.java:145)

I/Unity   ( 9867): 	at java.lang.reflect.Method.getReturnType(Method.java:184)

I/Unity   ( 9867): 	at java.lang.Class.getDeclaredMethods(Class.java:771)

I/Unity   ( 9867): 	at com.unity3d.player.ReflectionHelper.getMethodID(Unknown Source)

I/Unity   ( 9867): 	at com.unity3d.player.UnityPlayer.nativeRender(Native Method)

I/Unity   ( 9867): 	at com.unity3d.player.UnityPlayer.a(Unknown Source)

I/Unity   ( 9867): 	at com.unity3d.player.UnityPlayer$b$1.handleMessage(Unknown Source)

I/Unity   ( 9867): 	at android.os.Handler.dispatchMessage(Handler.java:98)

I/Unity   ( 9867): 	at android.os.Looper.loop(Looper.java:135)

I/Unity   ( 9867): 	at com.unity3d.player.UnityPlayer$b.run(Unknown Source)

I/Unity   ( 9867): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.tasks

It seems to be a problem with the AndroidPushPlugin Unity5.0. Anybody know how can I add the missing class?

Thanks

Alex

Push Notifications
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1807605288 avatar image 1807605288 ♦ commented ·

The core PlayFab SDK has very good support from Unity 4.7 to 5.4
The plugin support is not quite so vast. Are you able to update to Unity 5.4? I am investigating deeper, but I suspect updating to 5.4 might work.

0 Likes 0 ·

1 Answer

·
Alexandre Chimeno Bort avatar image
Alexandre Chimeno Bort answered

I am using Unity 5.4.0f3.

I solved the problem with the AndroidPushPlugin Unity4.7

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.