Hi, I’m trying to figure out why my Unity apk project is unable to be loaded through the computing unit (I have tried using Nebula on my Samsung S22+ as well but I am unable to load as well, so I believe this is a Unity project issue). I have encountered the following problems:
When I put the Unity apk into QuickInstall via USB c cable, it says ‘There is a parsing error’. I have found a workaround by using an APK editor to edit it the minimum SDK which is 15 (following that tutorial) and I could successfully download it through QuickInstall. The next problem is my current problem that I cannot solve:
The application does show on the main menu of the glasses, but when I click on it, the faint sound I notice whenever the glasses are booted up disappear (mind you, I am following the tutorial provided by XReal on setting up my SDK, so there is no sound anyway but a faint idle sound). I see none of the models and not even my controller. The only way I can back out of it is when I leave the computing unit on idle and it will exit the program itself. Does this mean the program crashed? I have no idea.
Can someone please help me? I have spend 2 full days trying to load a Unity project but I have no idea what else could be the issue. Is it the SDK is not compatible with my AR glasses (was bought during lockdown times, so a few years ago), and back when the company was still nreal, so help online is limited … Thank you to whoever sees this and is willing to help me work it through, I am very new to AR development.
Could you provide more details for further investigation?
Which type of glasses are you using? Air, Light, or another model?
Which version of NRSDK are you using?
Which version of Nebula are you using?
Since the latest version of NRSDK no longer supports the dev kit, I personally suggest testing your APK on the S22+. Additionally, if you are using SDK 2.2, please ensure that the minimum Android API level is set to 29 or higher.
Could you also build the HelloMR scene to run a test?
Hello Dorix, below are the answers to your questions:
Nreal Light (NR-9101GGL)
NRSDK: 2.2.1
Nebula: 3.8.0
In my Unity project, I did set the minimum Android API level as 29, but when I try to download it via the quick install or downloads in the computing unit, it does not allow me to download, giving me the error “There is a parsing problem”.
I have also used HelloMR as a test run and followed the tutorial exactly, but the “Parsing problem” occurred upon trying to download directly from the computing unit’s download folder.
So I assume that I have to access this application via Nebula instead of via the computing unit?
Edit: I also wish to ask on how I can debug this issue. Is there any terminal to access, and where?
Hello again Dorix, I have tried to use logcat in Unity to run the HelloMR project by connecting the computing unit to my laptop, and I found out that the SDK that can be run needs minimum API 27. I changed it to that, but the build still failed. Below are the following errors I received from the Unity Console:
Mainly I believe the issue is:
WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 34
This Android Gradle plugin (7.1.2) was tested up to compileSdk = 32
This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=34
to this project’s gradle.properties
The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 34
Hi Dorix, sorry for the multiple replies, as I am testing as much as I can as I go along. If the computing unit is no longer supported by NRSDK, how can I test it in my S22+? Is it directly through the build and run in Unity, or do I have to build the apk first, and let my phone install it as an application, and then load up Nebula and connect my phone to the glasses? Because I believe I have tried to do that before but I faced the same issue of a black screen through the glasses, and it kicks me out to the Nebula.
Update: I have tried Nebula AR Space again by connecting my phone to the glasses but I get the following error on my S22+:
'Sorry, the current device is still being adapted and temporarily unavailable.
You can:
Get AR experience from other devices:’
What do I do about this issue? Does this mean I cannot test on my S22+ either? I have tried AR Casting instead and opening the Unity app directly from my phone but it kicks me out anyway, so does this mean my Unity project (HelloMR) is not compatible with the glasses?
Edit:
It is possible to use another version of the SDK and Nebula to fix this issue?
Then, connect your phone to your PC and install the APK using the adb command: adb install yourapk.apk in the terminal.
Connect the glasses to your phone, open Nebula, enter AR Space, find your app, and open it.
Note that in casting mode, 3D applications cannot open. You’ll need to switch to 3D mode by entering AR Space.
However, from your description, it seems that you can’t use Light with the S22+. This is a bit strange because we’ve tested Light with the S22 before. I’ll test Light again and get back to you.
Build error with the Android Gradle Plugin:
To avoid this problem, you can use NRSDK 2.2.0.
If you use NRSDK 2.2.1, I suggest using Unity 2022.3 LTS.
But I think the most important issue now is that your phone is not compatible with Light. I’ll check on this.
Hi Dorix, thank you for getting back to me. I will test the APK again on my S22+ and get back to you via this reply.
Edit: I have tried to start AR Space. It sometimes glitches and kicks me out, giving me the error page mentioned previously about incompatibility, and sometimes it does work but only for a short period of time. I tried to load the HelloMR (the first version below this reply) but it shows an empty screen and kicks me back to the main menu. I am from a region where Nebula is not supported in my region, would that affect the Nebula? I have downloaded the apk from here: https://apkpure.com/nebula/ai.nreal.nebula.universal
And now, every time I try to load Nebula, it just glitches and my phone screen slowly goes black in the glasses.
Okay, I have provided the link to a Google Drive folder containing my apk, using Unity 2022.3.34f1 LTS. I will also try to create the same HelloMR in the different Unity engine you suggested above with the current NRSDK 2.2.1. I will share any relevant apk files in this same folder for you to test when needed, so I will create three in total:
HelloMR apk using NRSDK 2.2.1 with Unity 2022.3.34f1 LTS
HelloMR apk using NRSDK 2.2.1 with Unity 2022.3 LTS
HelloMR apk using NRSDK 2.2.0 with Unity 2022.3.34f1 LTS
good news! I successfully open your HelloMR and HelloMR3 on my android phone Samsung note 20 with Nebula 3.8.0 and light, which means your build process is completely correct.
Now I think we need to focus on the compatibility with S22+ and Light.
I am wondering which chipset your S22+ is using? Is it Exynos or Qualcomm? If it’s Exynos, Light is not compatible with that chipset. If it’s Qualcomm, we will continue troubleshooting the issue.
That’s great news! I used a third party app called CPU-Z to check my chipset and it’s a Qualcomm Snapdragon 8 Gen 1 3.00 Ghz.
Below I have provided screenshots that I believe to be relevant:
Could you check your Nebula version in Mine → About? I’d like to make sure we are using the same version of Nebula. Specifically, I’m interested in the minor version number.
Also, you mentioned earlier that your region is not within the supported range for Nebula. Could you let me know where you are located?
I have tried to connect my phone with light again and this time Nebula AR Space worked for more than usual. But, when I selected the helloMR project, it said ‘You are about to enter a third party application’ and it shows it loading, and then kicks me back to the Nebula AR Space main menu.
Also, when I downloaded the Unity app into my phone, I plugged in my phone to my laptop, copied the apk into my downloads folder and downloaded the app that way. Would that affect how the Unity apk works, or must I use the adb method? If so, I tried to use the command on my laptop but the command wasn’t recognised.
Installing the app using the method you described (copying the APK to your downloads folder and installing it from there) should not affect how the Unity APK works. However, I personally find using adb more convenient. If you want to use adb, you can Google how to install adb, as the installation process differs depending on your platform.
Since you were able to enter AR Space, let’s try another approach. After entering AR Space, go back to the home screen, which means putting Nebula in the background. At this point, the glasses should display a split phone screen (half on the left eye and half on the right eye), indicating that the glasses are in 3D mode. Then, find the HelloMR app on your phone’s home screen and open it. Can you see if this method works?
When I open Nebula, I pull up my phone’s home button and exit via there, and I see Nebula’s small icon in the corner. Is this correct? When I click on the phone controller’s home screen twice it exits the AR Space main menu and I only see a black screen.
When I click on the HelloMR in my phone, I see the Unity splash screen on my phone, and after that the glasses’ screen goes black and I’m kicked back to the AR Space main menu.
Pull up your phone’s home button (it’s OK to see the small icon of Nebula).
Click HelloMR on the home screen.
I also recorded a video to show the whole process.
In the video, when I put down the camera, I was trying to find the XREAL logo in the scene, but it doesn’t matter. You can see the white line (the laser from the controller) and a blue dot (the virtual menu), which means I successfully started the HelloMR.
I was wondering if you are using Dex mode because the issue you described is similar to the one in this post: Samsung Dex for Nreal Light. Could you take a look and see if disabling Dex mode helps?
My Samsung Dex has always been disabled. I have attached a recording of my phone screen here. It is exactly the same as yours, up until trying to load HelloMR in the Google Drive. HelloMR keeps crashing.