universal-tools / UTNotificationsFeedback

7 stars 0 forks source link

UTNotification doesn't work from Unity cloud build #47

Closed anhnguyenvn closed 7 years ago

anhnguyenvn commented 7 years ago

From a clean repo, I did local build and UT plugin worked fine, however cloud built one said Notification manager was failed to initialize. Would you please help me on that issue? Thank you so much.

yuriy-universal-ivanov commented 7 years ago

Hi @anhnguyenvn ,

Could you please tell me some more details?

Thank you, Best regards, Yuriy, Universal Tools team.

yuriy-universal-ivanov commented 7 years ago

Hi @anhnguyenvn ,

Were you able to solve the issue? Do you need any assistance on that or may I just close the GitHub issue?

Best regards, Yuriy, Universal Tools team.

anhnguyenvn commented 7 years ago

I am sorry for any inconvenience. I've just finished a long vacation. Could you wait for me several days to check again and to provide cloud build log, after getting back to work? Thank you so much. I do appreciate your help.

With regards, Anh.

Get Outlook for Androidhttps://aka.ms/ghei36


From: yuriy-universal-ivanov notifications@github.com Sent: Saturday, February 4, 2017 7:08:45 PM To: universal-tools/UTNotificationsFeedback Cc: Nguyen Hoang Anh; Mention Subject: Re: [universal-tools/UTNotificationsFeedback] UTNotification doesn't work from Unity cloud build (#47)

Hi @anhnguyenvnhttps://github.com/anhnguyenvn ,

Were you able to solve the issue? Do you need any assistance on that or may I just close the GitHub issue?

Best regards, Yuriy, Universal Tools team.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/universal-tools/UTNotificationsFeedback/issues/47#issuecomment-277440717, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHgXnMG5sc6wVNG8fjRBOzaJ43Z6nUQ6ks5rZGpNgaJpZM4Lr7CZ.

yuriy-universal-ivanov commented 7 years ago

Of course, feel free to get back whenever it's convenient for you.

anhnguyenvn commented 7 years ago

What target platform is affected by the issue?

Are push notifications enabled for that platform or not?

-- This is a log from cloud build showing UTNotificaitons exception--

2609: [Unity] ResolutionException: Android SDK path not set. Set the Android SDK property using the Unity "Edit > Preferences > External Tools" menu option on Windows or the "Unity > Preferences > External Tools" menu option on OSX. Alternatively, set the ANDROID_HOME environment variable 2610: [Unity] Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. 2611: [Unity] Rethrow as TypeInitializationException: An exception was thrown by the type initializer for UTNotifications.UTNotificationsDependencies 2612: [Unity] Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.


It seems UTNotifications needs some dependencies which are only built locally. I think maybe cloud build does not support what UTNotifications needs.

yuriy-universal-ivanov commented 7 years ago

Hi @anhnguyenvn ,

In my case Unity Cloud build indeed spams lots of messages like yours, but the app is still being built well. In order to avoid these warnings, you can replace #if UNITY_ANDROID with #if UNITY_ANDROID && !UNITY_CLOUD_BUILD in Assets/UTNotifications/Editor/Android/UTNotificationsDependencies.cs. Also, please make sure that all .aar files under your Assets/Plugins/Android are added under source control (so Unity Cloud Build downloads them).

Please let me know in case it didn't help (with as much details as you can).

Best regards, Yuriy, Universal Tools team.

anhnguyenvn commented 7 years ago

Hi,

I missed some play-services-***.aar files. I added and unity cloud build did work : ) Thank you so much for your help.

Best regards, Anh Nguyen