I’m having trouble getting HelloMR to work with my Xreal Air 2 Ultra Glasses. I can build and deploy the app but when I try to launch it I see the Made with Unity Splash screen on my phone and after a few seconds it returns to the home screen. Nothing appears in the glasses.
I can run Nebula. I can also run the the Spatial Life Demo using the apk download. https://nreal-public.nreal.ai/download/Application/spatiallife0619.apk
I’m using a Samsung Galaxy S23 Model SM-S911U1
One UI Version 6.1
Android version 14
Version: S911U1UES4CXE9 / S911U1OYM4CXE9 / S911U1UES4CXE9
Security Path Level: July 1, 2024
I’m following the steps outlined at Getting Started with NRSDK | NRSDK
I downloaded and installed
Unity 2022.3.39f1
NRSDKForUnityAndroid_2.2.1.unitypackage
Android SDK 14.0 (“UpsideDownCake”)
Android SDK Platform 34
Sources for Android 34
Opened Unity and created a new 3D Project
Imported NRSDKForUnityAndroid_2.2.1
Used the NRSDK project tips and accepted all
Set up the project for Android
For player settings I set
Player Settings > Resolution and Presentation > Default Orientation: Portrait
Player Settings > Other Settings > Auto Graphics API: False
Player Settings > Other Settings > Graphics APIs: OpenGL ES
Player Settings > Other Settings > Package Name: com.xreal.r4firstMr
Player Settings > Other Settings > Minimum API Level: API Level 34
Player Settings > Other Settings > Write Permission: External (SDCard)
Project Settings > Quality > VSync Count: Don’t Sync
In NRProjectConfig: Checked Reality and Vision, and supportMutliResume checked in NR Project Config. It was unclear which was correct for the Xreal Air 2 Ultra
NRKernalSessionConfig: Unchecked Force Kill While Glasses Switch Mode
NR Library Strip Config: Left everything unchecked
In Build Settings. Selected the scene NRSDK/Demos/HelloMR
In project settings I disabled MultiThreadedRendering and confirmed the scripting backend was set to IL2CPP
Then I chose build and run.
The app appears on my device and in the nebula app, but trying to launch it while wearing the glasses either through the nebula app or directly from the homescreen just flashes the Unity logo and then closes.
I’m including a link to a onedrive folder with screenshots of the settings and the logcat log
If any other info would be helpful please let me know HelloMRSteps
thank you for providing detailed information. Your settings seem to be correctly configured. However, the log file you provided does not contain enough details related to NRSDK. Next time, for a more comprehensive analysis, could you please capture the log from before you plug in the glasses until the app exits? This will help us get a complete picture of the issue.
In the meantime, I recommend you review a similar issue discussed in this post. It might provide additional insights and potential solutions.
Additionally, you might want to try building directly from this repo and using it as a template. This could serve as a good starting point and help identify any discrepancies in your current setup.
In my project settings - Player - Other Settings
I currently have:
minimum API Level set to Android 10 Level 29
Target API Level set to Automatic (highest installed)
I have Android SDK 33 and 34 installed via Android Studio
To be honest, I don’t know if my API settings are the most ideal or optimized, of if I need to change them because of my deployed device. I just kept iterating API changes until my app builds finally worked. I think there was another user that said 14.0 level 34 doesn’t work and in your settings, you just happen to have it set as a minimum.
I’m pretty sure you can only run your built Apps through Nebula, they do not start standalone
Otherwise, I believe the rest of your settings match mine.
If that still doesn’t work…
In some other threads here, we’ve posted some APK files via google drive to try. These were built by various users via the SDK, so try those out to ensure that it’s not because of your phone for some reason
There’s another thread where xReal posted a github repo of a Unity project. Building off of that worked for me.
Thanks for your quick reply
I create a new log from before I plugged in the glasses
It’s available at Microsoft OneDrive
For that log I plugged in the glasses. It prompted me to start Air Casting. I selected my app.
It showed the unity splash screen then closed.
After that I select nebula and airspace.
I found my app in airspace and tried to launch it from there
Again It showed the unity splash screen then closed.
Let me know if I can provide any more data to help diagnose the problem
I tried using the project from the repo. After linking it to my account it behaves the same way my project does.
I tried repeating the whole process on a different computer and had the same results.
I’ve shared APK files I’m generating APKs
The desktop and laptop APKs were generated on two different computers
The XRealSampleGitRepo APK was generated using git repo link
Does the app need to request more permissions or can that file be made not writable?
Error libc++abi terminating with uncaught exception of type jni::InvocationException: java.lang.SecurityException: Writable dex file '/storage/emulated/0/Android/data/com.xreal.HelloMrDesktop/cache/nr_api.dat' is not allowed.
sorry for the late reply. I’ve been a little busy recently. I’ve tried testing the APKs you uploaded to OneDrive.
Both of them worked well on my Samsung Note20, with Ultra and Nebula 3.8.0.
I was wondering if there are any permissions you might have missed granting.
For the SampleGitRepo app, it will request permission to show on top the first time you launch it. For the helloMRDesktop app, in addition to that, there is also a permission request to access media files, or something similar, after you grant the previous one.
Regarding the sequence to start the app, here’s a reference:
1. Insert Light into the phone.
2. Open Nebula.
3. Enter AR Space.
4. Pull up your phone’s home button (it’s okay if you see the small icon of Nebula).
5. Click HelloMR on the home screen.
Hello, bringing back this thread. I’m getting the same error:
Error libc++abi terminating with uncaught exception of type jni::InvocationException: java.lang.SecurityException: Writable dex file '/storage/emulated/0/Android/data/com.xreal.myapp/cache/nr_api.dat' is not allowed.
but all of my devices are on android 14. I noticed the Spatial Life demo demo does work on android 14 and was wondering if there was a beta version of nrsdk that supports android 14 that I could get access to. Any help would be appreciated
Actually, both NRSDK 2.2.x and 2.3.0 support Android 14. There’s also an example showcasing the integration of NRSDK with MRTK3, and the released apps run smoothly on Android 14 devices. You can check it out here:
Could you provide the complete log for us to investigate further?
Have you actually tried running the apps on Android 14? Last I heard from you, you were testing on Android 11. It’s been over a month and I’m still waiting for a reply.
I’ve had the Air 2 Pro Ultras for over 2 months and I still can’t get helloMR to run on a phone which one of the two officially supported devices. I don’t know what other information I can provide to get this resolved.
I’ve retested your APKs HelloMRDesktop and test221 on the BeamPro and S23, both with Android 14. And they worked well. I was wondering if you didn’t grant any permissions?
But when we look into your log again, we do find the same error as @tlsharkey posted.
51228 2024/07/29 13:58:13.545 19520 19569 Error libc++abi terminating with uncaught exception of type jni::InvocationException: java.lang.SecurityException: Writable dex file '/storage/emulated/0/Android/data/com.xreal.r4firstMr/cache/nr_api.dat' is not allowed.
We will investigate this issue further and get back to you.
But I found that none of the APKs in OneDrive has the same package name as this one in your log.
Could you send this APK to us so we can try to reproduce this problem on our side?
I couldn’t find the old APK, so I made a new one and a new log. I also included a log for SpatialLife running on my phone for comparison
The new logs and APK are here New Logs
I think I tracked down the difference
For my app it logs CompatibilityChangeReporter is set to Enabled