Build completed with a result of 'Succeeded' but when I'm running the app I see only black screen

801 Views Asked by At

Everything started when I was struggling with some another problem with building my app. I thought that updating unity to the newest 2023 version would solve this issue. So I did that and then my little nightmare started. I created a new project. At first everything looked normal. I copied two simple scripts that I had in my previous project and then hit build and run button. I started my project using unity AR template so everything was configurated as it should be. But when build was finished I oppened the app and then saw black screen. It was totally black unity splash screen also didn't showed up.

Here you have some information that console gave me when build was finished: Warning: The package cache was invalidated and rebuilt because the following immutable asset(s) were unexpectedly altered: Packages/com.unity.xr.arkit/Tests/Editor/Assets/TestReferenceImageLibrary.asset Packages/com.unity.xr.arcore/Tests/Editor/Assets/TestReferenceImageLibrary.asset

Warning: Import Error Code:(4) Message: Build asset version error: packages/com.unity.xr.arkit/tests/editor/assets/testreferenceimagelibrary.asset in SourceAssetDB has modification time of '2023-08-24T10:47:54.9559554Z' while content on disk has modification time of '2023-07-26T19:20:34Z'

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Warning: A meta data file (.meta) exists but its folder 'Packages/com.unity.xr.magicleap/Runtime/Plugins' can't be found, and has been created. Empty directories cannot be stored in version control, so it's assumed that the meta data file is for an empty directory in version control. When moving or deleting folders outside of Unity, please ensure that the corresponding .meta file is moved or deleted along with it. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Message: Android manifest path = D:\Unity Games\ARFoundationGame\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\AndroidManifest.xml UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Message: Application installed to device "2a2268a435027ece [SM-G960F]". UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Message: Build completed with a result of 'Succeeded' in 68 seconds (67706 ms) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

I think that might be a problem with my AR plugin, becouse when I build empty 3d project everything was fine, but then I added to this project AR plugin an error appeared. I don't remember message of this error (it was something about .meta file). When I removed plugin and re-instaled it. I didn't showed up again.

I tried:

  • deleting project and starting everything from begining
  • reinstaling unity 2023 version
  • changing version back to 2022
  • reinstaling unity hub
  • trying tu build empty unity AR template project (it also didn't work)
  • tried to use patching instead of build
  • tried to use another USB cable (I have some problems with my old one it disconnects from my computer randomly so I thought that would solve the problem)

Nothing of these helped. Please help me. I'm losing my hope in unity :(

1

There are 1 best solutions below

0
David On

I just resolved my own:

Warning: Import Error Code:(4) Message: Build asset version error: x has modification time of '2023-08-24T10:47:54.9559554Z' while content on disk has modification time of '2023-07-26T19:20:34Z'

In my case I had 2 Assembly Def files with the same name in the inspector. After I changed the names it worked fine.

I'm making my own package and accidently used the same name when I copy and pasted my asmdef file so it was a simple matter to fix the names. Hopefully you are able to as well, assuming this is even still relevent to you now :)