Development environment

Hi,
Which working versions do you work with?
Unity version, gradle versión, Unity configuration…?
Becasuse I tried all Unity 2022 LTS and major 2023 versions, and some Unity 6 versions and not be able to compile and generate APK for glasses.
Thanks in advance.

I use Unity 2022.3.21f1 which is reportedly the same version the xReal SDK developers/testers are using. Theoretically 2022 in general should work, but I figured it removes doubt to use the exact same version.

I have my Minimum API level set to 29, and Target API Level set to Automatic (highest installed), although I think I saw another user swears that they had to change the Target API Level to no higher than 33 in order to compile successfully.

I’m mainly using Android 14 on my phone to run the SDKs. My compiled APKs work except when it comes with hand tracking, and I can get hand tracking APKs to work on a different Android 13 phone.

Under my Edit → Preferences → External Tools tab, I have “Gradle installed with Unity” toggled on, which I believe is using the Gradle that came with 2022.3.21f according to the path setting.

Best of luck! And if you continue to get stuck, search the forum of a github repo from xReal that has a Unity project you can compile the demos with.

1 Like

Hi,
Thanks for the response. I now can compile de project and get the APK but when I try to deploy in Nebula it says “Your aplicattion is not compatible with device”.
Do you know the reason?
Thanks in advance.

Which project are you compiling and what device are you using?

Hi,
Using the same Unity versión. In development mode I get that message and in release mode aplication doesnt start in Samsung Galaxy S21 and S23 (android 14 both… Maybe this is the problem?)
Thanks.

I don’t know what else it could be at this point… you could look at this thread to see if there’s something else you can try:

Unable to get Hello MR Working on Air2Ultra

there’s 2 things you could try:
download the repo from that thread, and see if the xReal’s Unity project will compile and run for you.
in that same thread, people have posted their own compiled APK files that have run on some people’s phones, so you could try running them to help you isolate whether it’s your Unity APK or your phone that is the issue.

It seems that another developer encountered the same issue as you. Perhaps you could try using the same version of Unity as he did.
image
image

BTW, he uses the BeamPro which is running Android 14

I have used same Unity version. Created empty project, add NRSDK 2.2.1 and compile and I get following compilation errors:
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2023.2.20f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\32.0.0\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2023.2.20f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only.
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:launcher:mergeDebugNativeLibs’.

A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
2 files found with path ‘lib/arm64-v8a/libc++_shared.so’ from inputs:
- C:\Pedro\PROYECTOSUNITY\COMITAS\teleasistencia u2023220f1\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\build\intermediates\library_jni\debug\jni\arm64-v8a\libc++_shared.so
- C:\Users\pedrobihartech.gradle\caches\transforms-3\7a7fe209117481f1f7adcf0f6dd9f7d9\transformed\jetified-nr_common\jni\arm64-v8a\libc++_shared.so
If you are using jniLibs and CMake IMPORTED targets, see
Android Studio  |  Android Developers

Do you know what can it be?
Thanks in advance.

It seems that the errors you’re encountering are due to a conflict caused by two libc++_shared.so files. As far as I know, SNPE includes the libc++_shared.so library, and our hand tracking library references SNPE. The other is included by Unity starting from version 2023. This conflict is likely causing the build failure.
image

To resolve this, I suggest trying Unity version 2022.3.35. Because we recently discovered another issue with Unity related to TLS key insufficiency, which led to crashes. This issue was fixed in Unity 2022.3.34, so using Unity 2022.3.35 might help you avoid both the conflict and any related crashes.

image

Development environment issues can be quite frustrating. I hope Unity 2022.3.35f1 can solve your problem (I’m currently using this version as well, and everything seems to be working fine). Wishing you a great Friday!

Hi,
Thanks for your support. With Unity 2022.3.25f1 in release mode I get that message in device: Your application is not suported…
Creating APK in development mode application tries to launch but after few seconds it crash and back to Nebula.
I am using Samsung Galaxy S23 with Android 14. Should it work in this device??
Thanks in advance.

We’ve tested SDK with Ultra, S23, Android 14, it works well.

Just to confirm, your S23 is using the Qualcomm chipset, right?

Could you try using Unity 2022.3.35? We’ve encountered similar crashes before due to insufficient TLS, which might be the cause of the issue you’re seeing.

Another workaround you can try is this: after entering Nebula’s AR Space, don’t launch your AR application directly from there. Instead, go back to the home screen and try opening your app from there.

Hi,
Chipset is Qualcomm. I am using that Unity versión (2022.3.35f1) and application doesnt launch not in nebula neither directly from home screen.
Mobiles isnGalaxy S23 (SM-S911B/DS)
Any help is appreciated!
Thanks.

Perhaps you can send me your APK, so that I can test it on my side and catch some logs to see what’s wrong.

Hi Xdeng,

I send you wetransfer (Unique Download Link | WeTransfer) with some APKs (t22335f1_1.apk is compiled with Unity 2022.3.35f1 in release,
t22335f1_2.apk is compiled with Unity 2022.3.35f1 in debug,
teleu2022340f1.apk is compiled with Unity 2022.3.40f1,
teleasis2022322f1_1.apk is compiled with Unity 2022.3.22f1 in release,
teleasis2022322f1_2.apk is compiled with Unity 2022.3.22f1 in debug)
none of them worked…
If you can test it would be great.
Thanks in advance.

I’ve tested t22335f1_1.apk on a S23 SM-S911N, and it works well. Confused. Have you open the DeX mode? Mine is off.

Hi,
But is the same model exactly? Galaxy S23 (SM-S911B/DS). I have also DEX off. I try to launch application and it doesnt start (it shows unitys splash screen and them back to devices home screen, it must be some type of crash)…

The model differences are minor and shouldn’t prevent the app from opening. Just checking, are you using the Ultra glasses? If possible, could you catch a log for me? Start from when you plug in the glasses until the app exits.

Hi,

The error is here (also logcat in this wetrasnfer Unique Download Link | WeTransfer)
Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 22415 (UnityMain), pid 22369 (pany.tes22335f1)
2024-09-02 13:52:53.972 22495-22495 DEBUG crash_dump64 A pid: 22369, tid: 22415, name: UnityMain >>> com.DefaultCompany.tes22335f1 <<<
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #22 pc 000000000051d690 /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #23 pc 000000000052ce08 /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #24 pc 000000000052f07c /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #25 pc 0000000000578458 /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #26 pc 000000000053c25c /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #27 pc 000000000053c66c /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #28 pc 000000000053c1c8 /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #29 pc 0000000000579d98 /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #30 pc 0000000000579bb0 /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #31 pc 0000000000579b0c /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #32 pc 0000000000461a5c /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #33 pc 00000000004617bc /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #34 pc 00000000004617d4 /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #35 pc 00000000004616dc /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #36 pc 00000000004622dc /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #37 pc 0000000000462a98 /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #38 pc 00000000005aef8c /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #39 pc 00000000005c5bcc /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/lib/arm64/libunity.so (BuildId: f44a5bf94f10fbbd)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #42 pc 000000000001d0b8 /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/base.apk (com.unity3d.player.UnityPlayer.-$$Nest$mnativeRender+0)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #44 pc 000000000001bee0 /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/base.apk (com.unity3d.player.UnityPlayer$F$a.handleMessage+244)
2024-09-02 13:52:53.973 22495-22495 DEBUG crash_dump64 A #49 pc 000000000001c110 /data/app/~~jd6JYhDlGLt4omOr08ZKiQ==/com.DefaultCompany.tes22335f1-k1q9VMZQINXiSG3VFK1MNw==/base.apk (com.unity3d.player.UnityPlayer$F.run+48)

Thanks in advance.

Hi,

we reviewed the log, but it doesn’t include the process log. Could you try capturing it again using the following command: adb logcat > test.log?