Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android App Crashes When Opened #9

Closed
saratrajput opened this issue Nov 24, 2021 · 17 comments
Closed

Android App Crashes When Opened #9

saratrajput opened this issue Nov 24, 2021 · 17 comments

Comments

@saratrajput
Copy link
Contributor

Hello. I tried to install the provided android app on my Samsung Galaxy S10, but it crashes soon after opening. Is there any other pre-compiled package available?

I got the apk package from this link: https://github.com/microsoft/mixed-reality-robot-interaction-demo/releases/tag/1.0

@EricVoll
Copy link
Contributor

Hi @saratrajput
Thanks for opening the issue. No, there is currently no other precompiled version available. Do you also have this issue when compiling the app yourself and loading it via Unity?

@saratrajput
Copy link
Contributor Author

Hi @EricVoll
Thanks for the quick response. I haven't been able to compile the app myself. I am having trouble opening the project itself while following the given instructions. There is an error of invalid dependencies as seen in the following image:

image

I'm wondering if I'm missing any Azure-related components, but it isn't mentioned in the Installing the Components page.

Shall I open a separate issue for this error?

@EricVoll
Copy link
Contributor

EricVoll commented Nov 24, 2021

No, you don't have to install anything else. That's what the Unity package manager is for. It just can't access the required URLs to download the packages.

I am not sure why you are getting this error though. The config looks right and the dependency URL also seems to be ok. Two possible next steps (read both first, before you try one of them):

  1. You could try to download them manually and import them via Unity's Package Manager.
  2. The ASA docs say that they added support for Unity 2020 in another SDK release. This demo was created using Unity 2019 and the default ASA package URL points to the 2019 version (I think). Can you try opening the project in Unity 2019?

@saratrajput
Copy link
Contributor Author

I am using Unity 2019.4.10f1. Do you recommend any other version?
image

@EricVoll
Copy link
Contributor

Nope 2019.4.10f1 should be fine. Have you tried downloading and installing the packages manually?

@saratrajput
Copy link
Contributor Author

Manually downloading the packages and importing them worked, as in I don't have any more errors when opening the project. Also, for importing the package I had to follow the order of first installing the .core and then .android and .windows packages.

But now I've the compilation errors when I try to build.
image

Here are all the compilation errors:

Library\PackageCache\com.unity.xr.management@4.0.1\Editor\XRGeneralBuildProcessor.cs(36,52): error CS0117: 'BuildPipeline' does not contain a definition for 'GetBuildTargetName'

Library\PackageCache\com.unity.xr.management@4.0.1\Editor\XRGeneralBuildProcessor.cs(83,52): error CS0117: 'BuildPipeline' does not contain a definition for 'GetBuildTargetName'

Build completed with a result of 'Failed' in 2 seconds (2204 ms)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

UnityEditor.BuildPlayerWindow+BuildMethodException: Error building Player because scripts have compile errors in the editor
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bb] in <8004fcc221b54f98ba547350ea71d812>:0 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <8004fcc221b54f98ba547350ea71d812>:0 
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Error building Player because scripts have compile errors in the editor

Build completed with a result of 'Failed' in 2 seconds (1567 ms)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

UnityEditor.BuildPlayerWindow+BuildMethodException: Error building Player because scripts have compile errors in the editor
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bb] in <8004fcc221b54f98ba547350ea71d812>:0 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <8004fcc221b54f98ba547350ea71d812>:0 
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Do you need the whole error log with warnings as well?

@saratrajput
Copy link
Contributor Author

Also, the required version of spatial anchors package is 2.6.0, but the link you sent me above has only up to version 2.11.0. Could this be an issue?

image

@EricVoll
Copy link
Contributor

I think the ASA SDK has changed and maybe older versions are not working anymore - I personally haven't worked with ASA directly for quite some time now. This demo is about a year old, so lots of stuff has changed in the meantime and the demo probably needs an update (new ASA SDK Version and rewriting parts of the code for it)

@jeffdelmerico
Copy link
Contributor

It looks like you're using SDK version 2.6.0. According to the ASA Unity project tutorial, the minimum supported SDK version for Unity 2019 is 2.7.0.
MicrosoftTeams-image (5)

Can you upgrade your SDK version and try again?

@saratrajput
Copy link
Contributor Author

saratrajput commented Nov 29, 2021

@jeffdelmerico
I updated the ASA SDK version to 2.8.1 using the Mixed Reality Feature Tool. After updating the SDK version for the project, I had neither the errors shown above when opening the project nor the compilation errors once the project was opened.

I followed the steps from the wiki to check if everything was installed and downloaded correctly.

But once I built the android app following the steps in the video, the app still crashes as soon as it shows "Made with Unity" opening screen on my Samsung Galaxy S10. I tried to test it on another of my Android devices, Redmi Note 5, but it doesn't have AR capabilities.

So, now I wonder if it's only on my phone that this app doesn't work or others have had the same issue on different devices.

@jeffdelmerico
Copy link
Contributor

This seems like a device-specific issue, unfortunately. I'm unable to reproduce your error on my device. The pre-compiled app works fine for me, and I don't have any issues with the Unity build either. If you're encountering the same problem with both the precompiled app and the Unity build, it is probably your device. Are you able to test with another AR-enabled device? I would recommend testing with the pre-build version first if you're able to try with another device.

@AdamArena
Copy link

Hi Jeff and Suraj,

I encountered a similar issue and found manually installing packages didn't quite do it. Using the Mixed Reality Feature tool did.
Just thought I'd confirm that it ran fine after that on my Galaxy Tab s7, so yes probably a device issue. Good luck!

@jeffdelmerico
Copy link
Contributor

Thanks for the suggestion, @AdsyArena. I'm not sure if @saratrajput is still having trouble, but double-checking that all necessary runtime packages are installed through the MR Feature Tool is a good idea. In the meantime, we will also check if the documentation needs to be updated.

If the original problem is resolved, I will close this issue.

@saratrajput
Copy link
Contributor Author

@AdamArena Thanks for the update. @jeffdelmerico Yes, it might be a device-specific issue. I still need to test on other phones.
Yes, updating the documentation might be a good idea. I'm currently trying to make it work with the Hololens Emulator and have found issues regarding out-dated certificates. I'll create a separate issue for those.

@saratrajput
Copy link
Contributor Author

@jeffdelmerico Shall I create a PR for the documentation regarding using Mixed Reality Feature Tool to update the ASA SDK?

@jeffdelmerico
Copy link
Contributor

Thanks for the offer, but it won't be necessary for you to do a PR. We should revise the whole thing to bring it up to date with the current workflow anyway.

@EricVoll
Copy link
Contributor

I'll close this issue for now, since I expect the issue to be solved on the latest master. If it still persists, please fell free to reopen it again.
-Eric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants