Start a new topic
Solved

Black screen android unity build

Hello,

So I have a unity project in which I dragged a WikitudeCamera (deleted the original one that comes with a scene) and and ImageTracker. That's all there is in the scene. If I run it in unity with a webcam, it works perfectly. The image gets detected and the model gets show accordingly. But when I build for Android using my phone, I only get a black screen and nothing else.

Building and running the main menu scene from the example scenes does work. But only when I go from Menu Scene to any other scene, only then it works. If I build any example scene seperately, I get the same result. A black screen,

I have looked around on the forum trying to find a solution, but so far I haven't found one that works.

  • Wikitude_Unity_8-9-0_8-9-0_2019_09_24_03_43_11
  • Unity 2019.2.14f1
  • Device: Huawei P9
  • Platform: Android 7.0

img2.png
(36.3 KB)
img1.png
(4.86 KB)

This was also After going through Package Manager and updating everything.  Even on the 2022 LTS version it doesn't have the latest stuff.  I don't get a camera permissions which should be part of the Wikitude asset package by default.

The one who said to make a camerapermission script on an empty GameObject solved the problem of the black screen but this only works if I turn auto graphics API to disabled which makes it go into OpenGLES3 and after I put the wikitude key from their website into the Wikitude Camera inspector area otherwise it says App ID Mismatch.

Hi,


did you make sure to follow the details mentioned in this stream and other forum posts related to a black screen in combination with Unity? Please also check the setup and getting started guide in our Unity documentation to ensure that all steps are followed as required.


Thx and greetings

Nicola

Hi,

I have a black screen when I build a scene to an Android 10/ Unity 2018.4.27f1

Can anybody help?

To avoid Black Screen problem, I had to give camera permission manually (on android) after the Wikitude-AR based app get installed.

@elli karyati. Thank you. The camera is now working.

It's been a while since I did it. Sorry... 

In my start scene I created an empty game object and attached this script on it. So when I start my app for the first time it asks for permission.

Hope this works...

cs
(856 Bytes)

2 people like this

These 2 permissions were already there in the AndroidManifest.xml.

You have to give permission to your camera in the AndroidManifest.xml file.

<uses-permission android:name="android.permission.CAMERA" />

<uses-feature android:name="android.hardware.camera" android:required="true" />

Hello,


I am also facing the same problem. I dragged a WikitudeCamera (deleted the original one that comes with a scene) and and ImageTracker. That's all there is in the scene. If I run it in unity with a webcam, it works. But when I build and run for my Android phone, I only get a black screen along with Wikitude logo and nothing else.


Wikitude_Unity_9-0-0_9-0-0_2020_03_31_00_16_22

Unity 2019.4.5f1

Android Device: POCO F1

OS: Android 10

Image2.png
(41.3 KB)
Image1.png
(66 KB)

I finally managed to fix it and is running on my Android device.

I am not sure if it was a wikitude or unity problem. I started with a new project and imported the wikitude package at the beginning, but I had to make some changes on the script of the ManifestAR and ContinuousRecognitionController files in order to work. 

@Abhishek: did you manage to try it on other devices? Could you still reproduce it there, or is it just happening on the Nokia 6.1 plus?


@Elli: it seems like you have a problem either with your project or with your Unity / Android SDK installation in general. Is this happening with the project bundled inside the downloaded zip, or did you create a new Unity project and imported the .unitypackage into it manually?

I get the same error but the .apk file does not open at all in my device. I am using:


Wikitude_Unity_9-0-0_9-0-0_2020_03_31_00_16_22
Unity 2019.3.12f1

Device: Huawei Honor 7 Lite

Platform: Android 7.0


I attacked the error I am getting inside Unity.

Yes, it's an android device ( Nokia 6.1 plus ). Will try it on other devices and update you with log if the same problem persists.

Hi,


Is this issue still happening on Android, as the original post mentions, or is it iOS? Could you please tell us on which devices it is happening, and if you've tested on multiple devices? Is the problem reproducible on all of them, or just on some?

Additionally, could you please send us the logs from the device when the issue is occurring, so that we have more information to work with?


Thank you,

Alexandru

Login or Signup to post a comment