Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Other How do you Initialize UDP sandbox test mode ?

Discussion in 'Unity Distribution Portal (UDP)' started by OscarLeif, Aug 22, 2020.

  1. OscarLeif

    OscarLeif

    Joined:
    Jul 17, 2016
    Posts:
    20
    I read all the steps to follow

    Your game must clear a basic UDP Sandbox test before its first release. UDP will verify that your game initializes and purchases IAP items properly before letting you release your first revision and move to the submission stages.

    How to complete this step?Collapse
    • First, be sure to create UDP Sandbox Test accounts. You can do this in the section directly below, or in the Unity Editor. (Done)

    • Run your UDP APK on an emulator or a real Android device. (Done)
    • Use your UDP Sandbox Test account credentials to log in. (wait how do I do that ?)
    • Test your game, and make at least one IAP transaction. It's a sandbox environment, no real money is involved!

    • During the course of the above steps, your game will call the Initialize() and Purchase() methods.

    • You will see the results during your sandbox testing, and UDP will also capture the results on its back-end.
    The most confuse step is when running on a real device, also the test account I mean I have to use my Unity account here ?
    I'm confused in this step. Also what about when my game don't use IAP ?
    Probably not necessary but do I really need IAP to use UDP ?
     
    Lumpazy likes this.
  2. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,064
    Yess! I wanted to ask the exact same question!
    I'm using unity IAP, and selected Unity IAP->Android->"target Unity Distribution Portal (UDP)"
    I uploaded the latest apk binary to the UDP portal

    However, it's this step that confuses me:

    Use your UDP Sandbox Test account credentials to log in.


    When launch the app nothing happens, and in the debug console I just get a message that IAP is not initialized.
    The code I'm using was tested for google play and ios iaps and there it worked

    I added my gmail email that device uses to the sandbox accounts in the UDP dashboard.
    How do I get this magical UDP sandbox login screen?

    08-24 16:43:13.953 25037-25056/? I/Unity: Initializing UnityPurchasing via Codeless IAP
    08-24 16:43:13.963 25037-25056/? I/Unity: UnityIAP Version: 1.23.5
    08-24 16:43:14.113 25037-25056/? I/Unity: IAP OnInitializeFailed InitializationFailureReason:AppNotKnown


    I've been comparing all the ID's in the UDP settings and in the dashboard, all seem to match up ( unity project ID, client ID, Client key, etc), but for whatever reason the "game ID" is different, however there is no way to change it in either unity or the dashboard
     
    Last edited: Aug 24, 2020
  3. OscarLeif

    OscarLeif

    Joined:
    Jul 17, 2016
    Posts:
    20
    Ok I finally know why the reason of the sanbox email.
    You need to initialize the UDP package via script.

    https://docs.unity3d.com/Packages/c...@1.2/manual/Using_the_UDP_package_detail.html



    public class InitListener : IInitListener
    {
    public void OnInitialized(UserInfo userInfo)
    {
    Debug.Log("Initialization succeeded");
    // You can call the QueryInventory method here
    // to check whether there are purchases that haven’t be consumed.
    }

    public void OnInitializeFailed(string message)
    {
    Debug.Log("Initialization failed: " + message);
    }
    }


    After this the game will show up a new view to write your email and password that you manually set in the UDP console (the website).

    Too bad App Gallery will demand to be a premium App or must have IAP to publis via UDP.
    So after completed all the steps I cannot publish my app because of that.
    In this case I cannot upload my game because it's not a premium app or don't have IAP.
     
  4. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,064
    This is really strange - the manual clearly states to use one implementation, either Unity's IAP or the UDP code but not to mix them. I tried adding your code and also

    StoreService.Initialize(this);


    However, now I'm getting this error when running the app on the device:

     AndroidJavaException: java.lang.ClassNotFoundException: com.unity.udp.sdk.ChannelService


    I tried importing/installing UDP from both the package manager and IAP store, and it gives this error.

    I tried adding
            <meta-data
    android:name="UDP_SDK_VERSION"
    android:value="2.0.0" />
    <meta-data
    android:name="UDP_SDK_DIST"
    android:value="unityiap" />


    but that didn't help - that just gave the error that this was already added somewhere
     
  5. OscarLeif

    OscarLeif

    Joined:
    Jul 17, 2016
    Posts:
    20
    That error is because you forgot some android library. Maybe you should install the IAP plugins from the asset store that also install the UDP plugin.
     
  6. Unity-ChiBoon

    Unity-ChiBoon

    Unity Technologies

    Joined:
    Jan 18, 2017
    Posts:
    48
    Hi yuriythebest, you should be only using either the UDP SDK or Unity IAP package. If you are using Unity IAP package currently, please update to the latest version and reinstall again. It should guide you through to install the UDP package along the update.
     
  7. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,064
    Hi!
    If I did try using the Unity IAP code previously but got this error:
    InitializationFailureReason:AppNotKnown


    Hi Unity - Chiboon!

    1. Is Unity IAP for UDP currently actually supported? When using Unity IAP, should the "log into sandbox" dialog actually appear or is that only for the UDP SDK?
    Use your UDP Sandbox Test account credentials to log in.


    2. Should the UDP SDK be present, but not used, when using Unity IAP?

    3. Should be added to the androidmanifest in the case of using UDP SDK?

    4. I use unity 2018.4.10f and the latest version of Unity IAP / UDP SDK ( I was trying both since neither worked), is this version of unity supported? I do get the option of "target UDP" in the unity IAP settings
     
  8. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,064
    Okay, trying it again, the steps I did in my project was:
    1) Delete all unity IAP/Unity SDK stuff
    2) Added Unity IAP through services. It complained that stuff was missing so had to add unity IAP in the package manager as well.
    3). Now getting this error:
    Assembly 'Assets/Plugins/UnityPurchasing/Bin/Editor.dll' will not be loaded due to errors:
    Unable to resolve reference 'UDP'. Is the assembly missing or incompatible with the current platform?
    Reference validation can be disabled in the Plugin Inspector.

    4) because of #3, I had to install UDP: I clicked the imported UDP unitypackage that appeared when I imported unity IAP from services
    note: I had to install by clicking the packages, since the Install UDP dialog kept freezing

    Result1: When I set Unity IAP’s Target to Google Play I get the error NoProductsAvailable - fair enough, since I added them specifically for the UDP Version
    Result2: When I set Unity IAP’s Target to UDP, I get

    IAP OnInitializeFailed InitializationFailureReason:AppNotKnown


    I rechecked all the settings and compared the UDP settings in the dashboard and project,
    and the Game ID is different, all other things are the same, and there is no way to change the Game ID. Could this issue be because of the Game ID, and if so how do I change it?
     

    Attached Files:

    Last edited: Aug 27, 2020
  9. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,064
    I tried upgrading the project to unity 2020.1.3, still getting the error
    IAP OnInitializeFailed InitializationFailureReason:AppNotKnown
     
  10. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,064
    Okay, Small update if anyone has this same issue: I tried creating an empty project in 2020.1.3 and just installed unity IAP/configured the UDP settings inside unity, added a test iap from inside unity and now the UDP sandbox screen magically appears!! I'm able to login and make the test purchase ( it's only visible in the android studio logcat but returns purchase succeeded)

    EDIT: To anyone else having this issue, I was able to solve this by creating an empty project and setting everything up as described above, then go to my old project and export everything as a unitypackage, and import into the new project.

    The UDP Sandbox login thing is real, and should appear at the very start of your app if everything works. I tested it using Unity IAP

    Also not sure if it somehow "helped", but I also changed my iaps from "myiapname" to "com.myapp.myiapname" but not sure if this was critical
     
    Last edited: Aug 29, 2020
    Unity-ChiBoon likes this.
  11. Pixel8GameStudio

    Pixel8GameStudio

    Joined:
    Jul 15, 2020
    Posts:
    5
    Well, after struggling with this for a while because the documentation wasnt very helpful (unclear, typos in the code etc). Here is the solution of "Initializing the UDP SDK" for newbies :

    1. Create a new C# file (the file name is not important) and put the following code inside (the code from the documentation contains some errors that I fixed btw) :
    Code (CSharp):
    1.  
    2. using UnityEngine;
    3. using UnityEngine.UDP;
    4.  
    5. public class InitListener : IInitListener
    6. {
    7.     public void OnInitialized(UserInfo userInfo)
    8.     {
    9.         Debug.Log("Initialization succeeded");
    10.         // You can call the QueryInventory method here
    11.         // to check whether there are purchases that haven’t be consumed.    
    12.     }
    13.  
    14.     public void OnInitializeFailed(string message)
    15.     {
    16.         Debug.Log("Initialization failed: " + message);
    17.     }
    18. }
    2. Now go to your game main file and add using UnityEngine.UDP; at the top then put the following code in the Awake() or Start() method. In my case, I have a GameManager file that handle the game cycle, so I put this code inside its Awake() method.
    Code (CSharp):
    1.  
    2. # Instantiate the listener
    3. IInitListener listener = new InitListener();
    4. # Use the listener to initialize the UDP stuff
    5. StoreService.Initialize(listener);
    6.  
    3. Finally, build your project and run it on a real device (emulators may work but not the unity simulator). when the game launches you will be prompted by the UDP authentication dialog. Use the Sand box test account(s) to login and voilà!

    Cheers!
     
    Last edited: Sep 15, 2020
  12. suIly

    suIly

    Joined:
    Jun 21, 2017
    Posts:
    11
    Be sure not to attach the "InitListener" script to any gameobjects or you will get an error!
     
    SamOYUnity3D and Ishidres like this.
  13. kerem-yokuva

    kerem-yokuva

    Joined:
    Nov 21, 2015
    Posts:
    9
    you can not add a non-monobehavior class to an object
     
    Mashimaro7 and SamOYUnity3D like this.
  14. mindravelinteractive

    mindravelinteractive

    Joined:
    Jun 26, 2018
    Posts:
    5
    I am implementing UDP via Unity IAP and when I try to select "Window --> Unity IAP --> Android --> Target Unity Distribution Portal" I am getting the following response:
     

    Attached Files:

  15. mindravelinteractive

    mindravelinteractive

    Joined:
    Jun 26, 2018
    Posts:
    5
    And when I am trying to import UDP package from package manager then getting the response as shown in the attached screenshot. Don't know what to do next
     

    Attached Files:

  16. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    388
    Please uninstall the UDP package you installed before via Packman and then install the recommended one.

    To uninstall the UDP package via Packman: Window -> Package Manager -> Remove the UDP package.
    upload_2020-9-29_14-40-43.png
     
  17. arfish

    arfish

    Joined:
    Jan 28, 2017
    Posts:
    477
    Is this a Unity Pro thing?
    It simply doesn´t work in Unity 2018.4.27.

    UDP is installed, with settings and a UDP Sandbox Test Account.

    Had to add MonoBehaviour to the InitListener class, and add it to a gameobject to GetComponent<InitListener>(), instead of new InitListener().

    After that the Debug.Log("Initialization succeeded"); runs, but the Distribution Portal still says UDP Initialization Not detected.

    Same result when running the compiled apk on a device.
     
  18. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    388
    You need to run the apk on the device. Do you see the UDP login window and log in to the sandbox test account?
     
  19. arfish

    arfish

    Joined:
    Jan 28, 2017
    Posts:
    477
    There are no UDP login window on the device either. It´s the same in Unity 2019.4.

    The InitListener.OnInitialized(UserInfo userInfo) runs in the Editor but the userInfo is null in the callback.
     
  20. Petr777

    Petr777

    Joined:
    Nov 8, 2017
    Posts:
    36
    Can you tell please can we test in-apps (UDP package) in editor?
     
  21. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    388
    Petr777 likes this.
  22. arfish

    arfish

    Joined:
    Jan 28, 2017
    Posts:
    477
    It's the same script the signature PixelsJunkie used.
    The only difference are the InitListener class had to inherit from MonoBehaviour too.
    Both scripts are added to a separate object in the scene.
     
  23. Maurox

    Maurox

    Joined:
    Aug 13, 2019
    Posts:
    1

    Funciona al 100%, después de intentar muchas alternativas, esta fue la que funciono, no olviden de usar ;a directiva using UnityEngine.UDP; para que no les genere error en el código

    Gracias PixelsJunkie
     
  24. arfish

    arfish

    Joined:
    Jan 28, 2017
    Posts:
    477
    Ok, it works now. Guess it was just to wait for everything to kick in. :)

    The app asks for the password, and accepts the login. And the checkbox for Sandboxing appears in the portal.
    But now it asks for login at every start.

    Is it safe to remove the StoreService.Initialize(initListener) now?
     
  25. Pixel8GameStudio

    Pixel8GameStudio

    Joined:
    Jul 15, 2020
    Posts:
    5
    Yes, if you only needed to get your game confirmed on UDP.
    But if you use UDP services such as IAP, I believe that you have to keep this code and make it auto connect the next time your players launch the game.
     
  26. KatawareDoki

    KatawareDoki

    Joined:
    May 23, 2018
    Posts:
    9
    I don`t have IAP products in my game and when i start my game it appears. I enter a login and pass but "No resources was found... what to do right?
     
  27. Unity-ChiBoon

    Unity-ChiBoon

    Unity Technologies

    Joined:
    Jan 18, 2017
    Posts:
    48
    Are you able to see the UDP Initialization status is tested after you login? It should be fine to proceed with repack and publish if you are seeing tested status. If you are not sure, please email to udpsupport@unity3d.com with your game information. Our support team will look into it. Thanks.

     
  28. watermelonlab

    watermelonlab

    Joined:
    Sep 17, 2015
    Posts:
    11
    how to test IAP in sandbox environment when udp is implemented via Unity IAP? I did everything but no dialog of sandbox login showing.One thing is strange that my game id in Unity Settings -> Settings in unity editor is different from udp console but all other ids and keys are same. When I changed in price in Unity IAP Catalog it reflects the value in udp console but I don't why game id is different.
     
    Last edited: Oct 30, 2020
  29. lkmad

    lkmad

    Joined:
    Jan 28, 2016
    Posts:
    4
    Were you able to fix this? Have the same issue.
     
  30. BorjaFAC

    BorjaFAC

    Joined:
    Sep 29, 2015
    Posts:
    9
    Hey I am having the same issue, the script of PixelsJunkie is not working for me. I've tried attaching it to a button, but I receive no callbacks at all. I am using Unity 2020.1.11.1f and UDP 1.2.0, someone could help?

    edit: I fixed it using the other package (version 2.0 instead of 1.2).
     
    Last edited: Nov 16, 2020
  31. smart545

    smart545

    Joined:
    Feb 13, 2019
    Posts:
    2
    my app doesn't use purchases, but I'm still Forced to do a test UDP sandbox. How to fix it?
     
  32. akirayui

    akirayui

    Joined:
    Jul 25, 2019
    Posts:
    9
    I tried to implement UDP via Unity IAP but I encountered the error: Cannot set Android target to UDP. Make sure you have installed UDP in your project
    So, the sandbox login window won't pop.

    I followed the steps below:
    1- I enabled Unity IAP from Services and reimported the packages.
    2- Selected target as UDP (Window/Unity IAP/Android/Target UDP)
    3- I created game in UDP console from Editor (Window/Unity Distribution Portal/Settings)
    I filled the required fields on the UDP console, added a sandbox user. Credentials are the same in editor and console.
    4- Added products from Window/Unity IAP/IAP Catalog and synced with UDP
    I checked the UDP console, products are there.
    5- Added a script to initialize IAP, list and purchase products. (Already is working on Google Play Store)
    6- I built an apk and uploaded it to App Gallery Cloud Debug for testing it on a device. ( I don't have a real device.)
    7- I got the log file.
    Result: Initialization of IAP is failing and sandbox login window is not showing.

    Unity version : 2020.1.14f1
    IAP version: 2.2.2
    Manager Stripping Level: High
    Custom proguard file:
    Code (CSharp):
    1. -keep class com.unity.udp.**{*;}

    LOG FILE:

    2020-11-24 01:10:03 17917-17978/? I/Unity: UnityIAP Version: 2.2.2
    UnityEngine.Purchasing.StandardPurchasingModule:Instance(AppStore)

    (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    2020-11-24 01:10:03 17917-17978/? E/Unity: Cannot set Android target to UDP. Make sure you have installed UDP in your project
    UnityEngine.Purchasing.NativeStoreProvider:GetAndroidStoreHelper(IUnityCallback, AppStore, IPurchasingBinder, IUtil)
    UnityEngine.Purchasing.NativeStoreProvider:GetAndroidStore(IUnityCallback, AppStore, IPurchasingBinder, IUtil)
    UnityEngine.Purchasing.StandardPurchasingModule:InstantiateUDP()
    UnityEngine.Purchasing.StandardPurchasingModule:InstantiateStore()
    UnityEngine.Purchasing.StandardPurchasingModule:Configure()
    UnityEngine.Purchasing.PurchasingFactory:.ctor(IPurchasingModule, IPurchasingModule[])
    UnityEngine.Purchasing.ConfigurationBuilder:Instance(IPurchasingModule, IPurchasingModule[])

    2020-11-24 01:10:03 17917-17978/? E/Unity: NotSupportedException: Failed to bind to native store: System.NotImplementedException: The method or operation is not implemented.
    at UnityEngine.Purchasing.NativeStoreProvider.GetAndroidStoreHelper (UnityEngine.Purchasing.IUnityCallback callback, UnityEngine.Purchasing.AppStore store, UnityEngine.Purchasing.Extension.IPurchasingBinder binder, Uniject.IUtil util) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.Purchasing.NativeStoreProvider.GetAndroidStore (UnityEngine.Purchasing.IUnityCallback callback, UnityEngine.Purchasing.AppStore store, UnityEngine.Purchasing.Extension.IPurchasingBinder binder, Uniject.IUtil util) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.Purchasing.StandardPurchasingModule.InstantiateUDP () [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.Purchasing.StandardPurchasingModule.InstantiateStore () [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.Purchasing.StandardPurchasingModule.Configure () [0x00000]
     
    Last edited: Nov 24, 2020
  33. watermelonlab

    watermelonlab

    Joined:
    Sep 17, 2015
    Posts:
    11
    Decompile your apk and find UDP Package . if udp package is there then the problem with other integration part like if you use minify option then turn it off.
     
    Mayteka likes this.
  34. akirayui

    akirayui

    Joined:
    Jul 25, 2019
    Posts:
    9
    The problem occurs when managed stripping level is set to high or medium.
     
    Last edited: Nov 29, 2020
  35. Tobiberger

    Tobiberger

    Joined:
    Jun 26, 2020
    Posts:
    5
    Hello,
    I tried it with al mentioned ways now but the log in screen does not work. The last one tested is the ways from the live training. On the console i get the Message that the Initialization succeeded however there wont appear any loding screen on build. Test Accounts are set up.
    My Code:

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.UDP;
    3.  
    4. public class InitListener : IInitListener
    5. {
    6.     public void OnInitialized(UserInfo userInfo)
    7.     {
    8.         Debug.Log("Initialization succeeded");
    9.         // You can call the QueryInventory method here
    10.         // to check whether there are purchases that haven’t be consumed.      
    11.     }
    12.  
    13.     public void OnInitializeFailed(string message)
    14.     {
    15.         Debug.Log("Initialization failed: " + message);
    16.     }
    17. }
    18.  

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.UDP;
    5.  
    6. public class Init : MonoBehaviour
    7. {
    8.     IInitListener listener = new InitListener();
    9.     // Start is called before the first frame update
    10.     public void Awake()
    11.  
    12.     {
    13.         StoreService.Initialize(listener);
    14.     }
    15.  
    16.     // Update is called once per frame
    17.  
    18. }

    Can anyone help me=
     
  36. DucaDiMonteSberna

    DucaDiMonteSberna

    Joined:
    Jan 18, 2018
    Posts:
    30
    I have the same problem, no test ad shows. Also I cannot use the UDP included in IAP because when I switch "target UDP console" from unity IAP store unity promts a windoew saying " unistall UDP included in IAP and install from asset store id you want to target UPD "
     
  37. stevetaylor74

    stevetaylor74

    Unity Technologies

    Joined:
    Aug 13, 2020
    Posts:
    6
    FlyingSquirrels likes this.
  38. pluetoe

    pluetoe

    Joined:
    Apr 7, 2014
    Posts:
    1
    Thank you so much
     
  39. Ziplock9000

    Ziplock9000

    Joined:
    Jan 26, 2016
    Posts:
    278
    This worked for me, thanks so much.
    Why this is not front and centre in the UDP portal I don't know. Everything else is quite obvious.

    My question now is:

    Do I have to leave this code in all of the time now for internal builds? for public/release builds?
     
  40. Unity-ChiBoon

    Unity-ChiBoon

    Unity Technologies

    Joined:
    Jan 18, 2017
    Posts:
    48
    You won't need to remove the Sandbox testing scripts from your game. It will be replace with Store specific script after repacking.
     
    Ziplock9000 likes this.
  41. Blackelf2

    Blackelf2

    Joined:
    Nov 11, 2015
    Posts:
    1
    Good day. Problem with calling UDP. If I run a build on a device marked Development Build then udp is called and initialized. If you uncheck the development build checkbox then udp throws an error java.lang.ClassNotFoundException: com.unity.udp.sdk.ChannelService

    The second problem is if you call StoreService.Initialize (listener);
    then on the device the window for entering the udp is called 2 times If you don't call StoreService.Initialize (listener); udp starts normally (works only in Development Build).

    Unity version 2020.1.17f1
    UDP version 2.1.4
    IAP version 2.2.2
     
  42. marounkattar

    marounkattar

    Joined:
    Jul 1, 2019
    Posts:
    3
    Hello guys i am not using API ,in unity editor I get Initialize succeed i create a new test sandbox both on UDP server and unity they are the same .
    my question is why on real device the Login screen is not appear?
     
  43. marounkattar

    marounkattar

    Joined:
    Jul 1, 2019
    Posts:
    3
    okay every thing is good sandbox is working my problem was that is enable the minify release you must disable it .
     
    VirtualPro likes this.
  44. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    205
    Okay so I'm trying to convert a game that used Unity IAP to work with Unity UDP. I'm using "purchasing package 2.2.2" which I've reimported. I'm using UDP from the "Services" tab and package manager (Version 2.0.0) and I'm also getting this error on deployment:

    Code (CSharp):
    1. 06-10 17:14:52.910 22331 22362 E Unity   : AndroidJavaException: java.lang.ClassNotFoundException: com.unity.udp.sdk.ChannelService
    2. 06-10 17:14:52.910 22331 22362 E Unity   : java.lang.ClassNotFoundException: com.unity.udp.sdk.ChannelService
    3. 06-10 17:14:52.910 22331 22362 E Unity   :      at java.lang.Class.classForName(Native Method)
    4. 06-10 17:14:52.910 22331 22362 E Unity   :      at java.lang.Class.forName(Class.java:454)
    5. 06-10 17:14:52.910 22331 22362 E Unity   :      at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    6. 06-10 17:14:52.910 22331 22362 E Unity   :      at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
    7. 06-10 17:14:52.910 22331 22362 E Unity   :      at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
    8. 06-10 17:14:52.910 22331 22362 E Unity   :      at android.os.Handler.dispatchMessage(Handler.java:103)
    9. 06-10 17:14:52.910 22331 22362 E Unity   :      at android.os.Looper.loop(Looper.java:214)
    10. 06-10 17:14:52.910 22331 22362 E Unity   :      at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
    11. 06-10 17:14:52.910 22331 22362 E Unity   : Caused by: java.lang.ClassNotFoundException: com.unity.udp.sdk.ChannelService
    12. 06-10 17:14:52.910 22331 22362 E Unity   :      ... 8 more
    13. 06-10 17:14:52.910 22331 22362 E Unity   :   at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <00000000000000000000000000000000>:0
    14. 06-10 17:14:52.910 22331 22362 E Unity   :   at UnityEngine.AndroidJNISafe.FindClass (System.String name) [0x00000] in <00000000000000000000000000000000>:0
    15. 06-10 17:14:52.910 22331 22362 E Unity   :   at UnityEngine.AndroidJavaClass._AndroidJavaClass (System.String className) [0x00000] in <000000000000000000
    EDIT: Turns out I also had minify on
     
    Last edited: Jun 10, 2021
  45. Unity-ChiBoon

    Unity-ChiBoon

    Unity Technologies

    Joined:
    Jan 18, 2017
    Posts:
    48
    I assume you have solved your issue. To make it clear again, you can add the following line to your Proguard file if you have enabled minify

    -keep class com.unity.udp.** { *; }
     
unityunity