Search Unity

The type or namespace name 'IStoreListener' could not be found

Discussion in 'Unity IAP' started by drndfx, May 31, 2019.

  1. drndfx

    drndfx

    Joined:
    Jul 3, 2013
    Posts:
    89
    I think my project is corrupt.

    Tried to install IAP from Services tab as well as Asset Store, but I keep getting errors such as

    The type or namespace name 'IStoreListener' could not be found (are you missing a using directive or an assembly reference?)
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please provide more information, what version of Unity and what version of IAP. The latest IAP version is 1.22. And avoid Unity 2019 with IAP (for now). Please follow the 2 minute video here for what you should expect when importing IAP, specifically the API update prompt, you must select "Yes, I have made a backup". https://forum.unity.com/threads/sample-iap-project.529555/
     
  3. drndfx

    drndfx

    Joined:
    Jul 3, 2013
    Posts:
    89
    Thank you very much.

    I'm using 2019.1.4f1 and I'm not sure what version of IAP is. I used Services tab IAP.
    Do you know what specific version of 2019 we should avoid (with IAP)?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I did not mention a specific version for 2019, but you would want to use 2018 for now.
     
  5. drndfx

    drndfx

    Joined:
    Jul 3, 2013
    Posts:
    89
    I re-installed 2018 and it is working now. Thank you.

    For some reason I had to Import Services tab IAP and Package Manager In-App Purchase in order for it to work.

    Will you be able to confirm if i have to install both like that?
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, both are required.
     
  7. SwixDevs

    SwixDevs

    Joined:
    Apr 19, 2019
    Posts:
    6
    What all packages did you have to import to make it work? Please tell...
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Are you receiving an error? The IAP installer should install the Asset store plugin 1.23.1 and the "In App Purchasing" Version 2.0.6 in Package Manager
     
  9. SwixDevs

    SwixDevs

    Joined:
    Apr 19, 2019
    Posts:
    6
    I am still receiving the error "Type or namespace iStoreListener could not be found."
     
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please try installing IAP on a new project to compare. Or reinstall on this project, make a back up first. Even better, use this Sample IAP project https://forum.unity.com/threads/sample-iap-project.529555/
     
  11. BDS_STUDIOS

    BDS_STUDIOS

    Joined:
    Dec 8, 2020
    Posts:
    3
    I have an project in which the same error occur plz tell me I have to I import you file for resolve it
     
  12. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    The same recommendations apply. Often restarting Unity will help also. Ensure you are using IAP 2.2.7 Asset version (menu Window/Unity IAP/IAP Updates..) and In App Purchasing Library 2.2.2 (Package Manager)
     
  13. BenoitFreslon

    BenoitFreslon

    Joined:
    Jan 16, 2013
    Posts:
    163
    Same problem with Unity 2020.3.47f
    In App Purchasing 4.7.0

    upload_2023-4-11_10-49-3.png
     
    Last edited: Apr 11, 2023
  14. Yannick_D

    Yannick_D

    Unity Technologies

    Joined:
    Feb 21, 2022
    Posts:
    231
    Hello,
    The samples will be fixed in 4.8.0 which will be out soon!
     
    Thinkdome2022 likes this.
  15. THE2FUN

    THE2FUN

    Joined:
    Aug 25, 2015
    Posts:
    63
    You can't be serious right ?
     
  16. THE2FUN

    THE2FUN

    Joined:
    Aug 25, 2015
    Posts:
    63

    Attached Files:

  17. Arnaud_Gorain

    Arnaud_Gorain

    Unity Technologies

    Joined:
    Jun 28, 2022
    Posts:
    182
    Hi @THE2FUN,
    This has been resolved within 4.8.0, you can find the change log here:

    Fixed

    • Samples - Some samples had IAP 4.6.0 IStoreListener changes not completely implemented causing compilation errors.
     
  18. didonecompany

    didonecompany

    Joined:
    May 24, 2022
    Posts:
    6
    Not resolved, I had version 4.3.0 and everything worked fine, updated to 4.8.0 and got this error that never happened
     
  19. didonecompany

    didonecompany

    Joined:
    May 24, 2022
    Posts:
    6
    Code (CSharp):
    1. public void OnInitializeFailed(InitializationFailureReason error, string message)
    2. {
    3. // Implementation for new version
    4. }

    this solved the problem
     
    THE2FUN likes this.
  20. THE2FUN

    THE2FUN

    Joined:
    Aug 25, 2015
    Posts:
    63
    I got same error in "com.unity.purchasing" version "4.10.0" PROBLEM IS STILL EXIST. PLEASE FIX IT. PLEASE LOOK AFTER WHAT YOU DONE. Don't you have quality control crew???????

    And i realise oh i replied 8 months before and solved myself, now i am still came back for solution.