Log in or register to post comments

Why is my app screen black when I build to Android? What am I doing wrong?

October 5, 2018 - 7:28am #1

Hello, everyone. I have been working on an AR app since January of this year. I began the build using Unity 2017.3 and Vuforia 7.1.35. After a while, I kept running into some issues that I couldn't work out so I took a break from it. I came back to the project in late summer and I was able to work out those particular bugs. I tested the app on my phones, and it worked as designed, minus a few cosmetic issues. I fixed those cosmetic issues, but before I had a chance to export the app to my phones again, I absent-mindedly upgraded Unity to version 2018.2.1F1 and that's where the problems began. When I test it in Unity, the app works just as I intended. The models track, the sounds and animation play and pause on cue, the links work, and most importantly, the camera works. When I build and run to my Android device(s), however, everything is black. In earlier builds, all of my scenes would load fine leading to the actual AR camera scene. The three most recent builds have all resulted in a black screen immediately after the app opens. No splash screens or anything. I've tweaked my build settings and player settings numerous times to try to weed out the problem, but no luck yet. I've also scoured the Unity and Vuforia forums for help with the issue, but even still, I have been unable to find a viable solution. Everything I read was either outdated, pertaining to iOS, or not even answered at all. So, I am posting this question to hopefully get some solid answers for myself and anyone else who may be having this issue. Please help!!!

I am testing my app on a Samsung Galaxy On5, a Samsung Galaxy S7, and a Samsung Galaxy S8 Active. I should probably also note that my S7 and S8 phones have updated to the newest Android version since January and some time in the summer. I don't exactly remember when. I am happy to provide any other specific details if necessary. Thank you.

Why is my app screen black when I build to Android? What am I doing wrong?

February 17, 2020 - 7:05pm #8

same issue with me

delusie, thankyou for your info, it's work for me too,

have a nice days 

deluise4 wrote:

Hello, everyone! I am glad to announce that I was able to work out the issue with the Android black screen. I'm still not exactly sure of what the cause or cure was, but the problem went away after I followed these steps. The first thing I did was update my Vuforia software to 7.5. After restarting Unity, I opened a test project that I had been working on with the previous Vuforia. I then reimported all of the updated core samples and AR/VR samples. I successfully tested the user-defined target and the image target scenes in Unity, and on my phone(s). I made notes of Vuforia's default settings and I compared them to my notes from my project's camera, player, and build settings. From there, I adjusted my settings to match the Vuforia settings. I THINK, and I could be wrong, that the issue was in the Player Settings, under the Other Settings tab. For Target Architectures, I had all 3 selected (ARMv7, ARM64, and x86), and that's when the app would load, but the camera would be black. Whenever I unchecked ARM64, everything worked beautifully. As I said, I don't know if that was the direct cause, but that's how I worked it out. If you're having the same issue, hopefully, this works for you, too.

Why is my app screen black when I build to Android? What am I doing wrong?

November 29, 2018 - 8:41am #7

Hello, everyone! I am glad to announce that I was able to work out the issue with the Android black screen. I'm still not exactly sure of what the cause or cure was, but the problem went away after I followed these steps. The first thing I did was update my Vuforia software to 7.5. After restarting Unity, I opened a test project that I had been working on with the previous Vuforia. I then reimported all of the updated core samples and AR/VR samples. I successfully tested the user-defined target and the image target scenes in Unity, and on my phone(s). I made notes of Vuforia's default settings and I compared them to my notes from my project's camera, player, and build settings. From there, I adjusted my settings to match the Vuforia settings. I THINK, and I could be wrong, that the issue was in the Player Settings, under the Other Settings tab. For Target Architectures, I had all 3 selected (ARMv7, ARM64, and x86), and that's when the app would load, but the camera would be black. Whenever I unchecked ARM64, everything worked beautifully. As I said, I don't know if that was the direct cause, but that's how I worked it out. If you're having the same issue, hopefully, this works for you, too.

Why is my app screen black when I build to Android? What am I doing wrong?

October 17, 2018 - 12:57pm #6

Hello @deluise4,

This sounds like a potential mismatch between the version of Vuforia that you're using, and the version of the samples being used. This is a known issue with Unity that we are actively working with them to correct.

If you're still interested in moving forward, I would suggest that you download a recent version of Unity (2018.2.12), upgrade Vuforia to 7.5.20 and then download the samples from the Unity Asset Store. This *should* resolve the issue you're seeing and unblock you.

Thanks,

Vuforia Engine Support

Why is my app screen black when I build to Android? What am I doing wrong?

October 17, 2018 - 6:58am #5

medabit wrote:

Hello,

I would suggest that you baseline your testing by starting with the Vuforia Samples. If those display a black screen, respond here and I can investigate further.

However, if the samples *work* on your device (no black screen), then use them as a basis for comparing your project's settings.

Thanks,

Vuforia Engine Support

I remember the problem now once I started the new project. I always get this list of errors and warnings:

"Assets/Common/Scripts/TrackableSettings.cs(22,12): error CS0246: The type or namespace name `FusionProviderType' could not be found. Are you missing an assembly reference?"

"'Assets/Models/VuforiaMars_ModelTarget/ddcf29fe83b64ee984697b36afc5e823/Model.prefab' is not a valid prefab since it has no root game object.

UnityEditor.PrefabUtility:CreatePrefab(String, GameObject)

Vuforia.EditorClasses.CADModelExtractor:ReadModels(String)

Vuforia.EditorClasses.TargetDataPostprocessor:OnPostprocessAllAssets(String[], String[], String[], String[])

UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])"

"Overriding existing asset with new GUID from package, this may break links within your project to package assets (Assets/Resources/VuforiaConfiguration.asset)"

I followed a few suggestions in the forum to correct that issue, but they were all dead ends so I left it alone. Back to the drawing board.

Why is my app screen black when I build to Android? What am I doing wrong?

October 17, 2018 - 6:37am #4

Hello, Medabit. Thank you for the suggestion, I am going to try that now. I will start a brand new project using the current version of Vuforia that I already have installed and the default settings. Although, I think I tried that before, but there was also a problem with the samples. Either way, I'll try and let you know what happens.

Why is my app screen black when I build to Android? What am I doing wrong?

October 15, 2018 - 1:37pm #3

Hello,

I would suggest that you baseline your testing by starting with the Vuforia Samples. If those display a black screen, respond here and I can investigate further.

However, if the samples *work* on your device (no black screen), then use them as a basis for comparing your project's settings.

Thanks,

Vuforia Engine Support

Why is my app screen black when I build to Android? What am I doing wrong?

October 13, 2018 - 1:12pm #2

I'm running into this issue as well, after updating Unity to 2018.2.12f1 and Vuforia to 7.5.20.  And maybe one step farther but no solution yet either:

I started a brand new project using an image target database I created only a month ago (the first target is the "stones" image provided by Vuforia).  

I'm using basic 3d shapes as an early test to make sure everything works.

Previewing from the editor works as expected.

Building to my Android Moto G5 Plus only showed a black screen after the Unity splash.  

I noticed that Video Background was turned off in Vuforia Configuration.  When I turned it on, the screen was no longer black and was now showing the view from my phone's camera.  However, nothing is being rendered when the printed image is clearly visible in the camera (8.5x11 print viewed at ~1.5 feet away).

There are no errors in the adb logcat.  Everything initializes just fine.

In the log I did notice a line that said "Vuforia is in VR configuration."

This is not a VR project, just AR, so I thought that was confusing, but haven't found any information on what this means yet.

Note:  I applied the Vuforia 7.5.20 update to a similar project built in Unity 2018.2.10f1 and it works fine.

Log in or register to post comments