Search Unity

Unity 2018.3 + ARCore as Exported Project - 'Unable to find UnityARCore'

Discussion in 'Handheld AR' started by KMarc, Dec 21, 2018.

  1. KMarc

    KMarc

    Joined:
    Feb 5, 2018
    Posts:
    22
    I'm running into an issue where I get the error of 'Unable to find UnityARCore' when I 'Export Project' and attempt to run it on my device. If I instead build straight from Unity to my device, it works fine.

    I found a few other people having this issue:
    https://stackoverflow.com/questions/50578439/unity-arcore-dllnotfoundexception-arcore-unity-api
    https://github.com/google-ar/arcore-unity-sdk/issues/436

    I'm running ARFoundation preview 22 and ARCore preview 24.

    One person commented and said : 'I migrated back to Unity 2018.x to 2017.4.6f => now it works'

    We are using the new LWRP in our project so obviously we need to stay on Unity 2018.3

    Is this a known issue @tdmowrer ?
     
  2. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    490
    This is not an issue of which we are aware. I just tried the Export Project option using the same package versions and Unity 2018.3.0f2. I imported the project into Android Studio and ran it on a Pixel (1). It worked as expected and the video feed rendered correctly. I also inspected the APK built from Android Studio, and the ARCore+ARFoundation related libraries are present. Their location matches those in the APK built from Unity, so it seems everything is working as expected.

    Are you able to reproduce this using the ARFoundation samples GitHub repo?
     
  3. KMarc

    KMarc

    Joined:
    Feb 5, 2018
    Posts:
    22
    @tdmowrer Thanks for looking into this for me. After coming back to this, I restarted the whole process from scratch and was able to build successfully this time. Sorry for mis reporting this issue, I'm not sure what the problem was for me in the beginning!
     
  4. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    490
    Glad it's working for you now. If you see this issue again, a Development Build may provide more details in logcat, for instance, why it couldn't load or where it was trying to load it from, rather than just "Unable to load".
     
  5. AlCampbell

    AlCampbell

    Joined:
    Jan 8, 2018
    Posts:
    4
    I'm having the same issue in a project that was originally created using ARCore before moving over to ARFoundation.

    Analysing the APKs shows that the version exported and built in Android Studio contains libarcore_unity_api.so, while the version built directly in Unity contains libUnityARCore.so. Is there any reason why the build method would affect the files included in the APK like this?
     
  6. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    490
    It sounds like you are comparing an APK built with the ARCore SDK for Unity vs ARFoundation. The ARCore SDK for Unity contains a lib called libarcore_unity_api.so while ARFoundation uses one called libUnityARCore.so. These are two completely different SDKs that use different libraries. This does not sound like a difference between Unity and Android Studio -- are you sure you are analyzing apks built from the same project?
     
  7. AlCampbell

    AlCampbell

    Joined:
    Jan 8, 2018
    Posts:
    4
    Definitely from the same project, built one immediately after the other. I'll take another look through the project to make sure that everything from the old ARCore version has been stripped out properly.

    Cheers.
     
  8. AlCampbell

    AlCampbell

    Joined:
    Jan 8, 2018
    Posts:
    4
    I managed to find a couple of leftover ARCore SDK files and removing them has resolved the UnityARCore not found error, but we are still unable to run an exported project.

    Running a build from Android Studio now throws a series of errors in logcat:


    2019-03-19 09:19:09.255 14248-14274/? E/Unity-ARCore: Failed to register lifecycle provider, Camera subsystem will be unavailable!
    2019-03-19 09:19:09.255 14248-14274/? E/Unity-ARCore: Failed to register lifecycle provider, Depth subsystem will be unavailable!
    2019-03-19 09:19:09.255 14248-14274/? E/Unity-ARCore: Failed to register lifecycle provider, Plane subsystem will be unavailable!
    2019-03-19 09:19:09.255 14248-14274/? E/Unity-ARCore: Failed to register lifecycle provider, Raycast subsystem will be unavailable!
    2019-03-19 09:19:09.255 14248-14274/? E/Unity-ARCore: Failed to register lifecycle provider, ReferencePoint subsystem will be unavailable!
    2019-03-19 09:19:09.255 14248-14274/? E/Unity-ARCore: Failed to register lifecycle provider, Session subsystem will be unavailable!
    2019-03-19 09:19:09.255 14248-14274/? E/Unity-ARCore: Failed to register lifecycle provider, Input subsystem will be unavailable!



    I can see that others have had this problem, as there is an issue raised on GitHub, but it doesn't look like anyone has had any luck in finding a solution?
     
  9. vishalghadge

    vishalghadge

    Joined:
    Feb 12, 2019
    Posts:
    4
    I am also getting the exception DllNotFoundException, i am using unity 2018.3.5f1
    and android studio 3.1.2 ,
     

    Attached Files:

  10. Aelop

    Aelop

    Joined:
    Jan 14, 2018
    Posts:
    4
    Same Error in 2018.3.6 ,black screen
    Apk Libs from Exported from android studio
    9G[])A4I$3G65]5M1X]PR(N.png

    and this one directly export from Unity
    20190401181644.png
     
  11. vishalghadge

    vishalghadge

    Joined:
    Feb 12, 2019
    Posts:
    4
    I have debugged with development build and its giving error like this
    "Unable to lookup library path for 'arpresto_api', native render plugin support disabled."
    what to do now
     
  12. Aelop

    Aelop

    Joined:
    Jan 14, 2018
    Posts:
    4
    After disabling Instant Run in Android studio, this error no showing up, and ARCore runs well
     
  13. vishalghadge

    vishalghadge

    Joined:
    Feb 12, 2019
    Posts:
    4
    It's not working for me can you share the steps you done form scratch
     
  14. Aelop

    Aelop

    Joined:
    Jan 14, 2018
    Posts:
    4
    maybe you should try to reinstall ARCore XR Plugin in Package Manager
     
  15. FEERtheGame

    FEERtheGame

    Joined:
    Apr 12, 2018
    Posts:
    4
    Thanks @Aelop
    Disabling Instant Run in Android Studios also solved the problem for us
     
  16. ypatiaar

    ypatiaar

    Joined:
    Jun 7, 2019
    Posts:
    1
    Hi, i am facing the same issue.
    I am using googles arcore because i need anchors ( i don't know if arfoundation supports them).
    I have embed unity in a sub view in andoid's activity. I am compiling using IL2CPP but when my app triggers the unity i get
    Unable to find arpresto_api
    E/Unity: DllNotFoundException: arcore_unity_api.

    Any help please

    Thank you.