build error UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors - unity3d

The following error occurs when unity builds with Android phone.
enter image description here
The first time you don't set anything up, the build will succeed.
However, after downloading the ar foundation and arcore xr plugin package, the following error occurs.
What's the reason?

As the error at the top says, you have the Vulkan graphics API enabled and it’s not supported by ARCore. Go into Player Settings > Android and remove Vulkan from the list of graphics APIs. (If it’s not listed because Graphics API is set to Auto you’ll need to disable Auto I guess).

Related

IL2CPP interfering with gravity (RigidBody)

I have created an app in unity to load asset bundles. When I load asset bundles, game objects with rigid body components and isGravity is off are working fine. But when I enable isGravity, gameo bjects start to pass through each others. This problem is Only happening in IL2CPP build but every thing is working fine in Mono build settings.
My unity version is 2019.4.
Thank you in Advance.
If it works in the Mono version, it is probably a Unity bug.
If you can, update Unity to a newer version, and see if the problem goes away.
While searching some topics, I found out that Unity has a setting called "Strip Engine Code" that is enabled in IL2CPP. This setting is enabled by default in IL2CPP to remove unwanted or not useful codes. As a result, the scripts used in Asset bundles are not included while building IL2CPP Android apps.

How to fix google play console unsupported devices(OpenGL ES and framework version)

I uploaded my unity android game in Google Play Console but got many unsupported devices. Reasons for devices being unsupported are
Doesn't support required OpenGL ES version: 3.0
Doesn't support framework version: 22 and onwards
In Project Settings> Other Settings I have set Graphics APIs Vulkan, OpenGLES3 and OpenGLE2 in that order and
Minimum API Level: Android 4.4 'KitKat' (API level 19)
Target API Level: Automatic (highest installed)
I tried setting Auto Graphics API and changing the order of the APIs in list but still get the same result
First of all, it is normal that there are a few unsupported cell phone models in the Playstore. There are such a large number of devices that its not possible to modify your app for all of them.
1
So I have also published a game from Unity to the playstore.
I haven't played around with the Graphics API at all. I set it to Automatic (the default values ​​are DirectX 3.0, DirectX 2.0)
and it works fine.
In your case, Vulkan might get used to build and google does not like it.
2
Probably the fix from number 1 will fix this problem, but to really help, we need more informations.

Vuforia AR Camera working from the second attempt on Android

I have an Android application which I created using Unity and C#, it also uses Vuforia. I have an AR Camera, which shows a black screen when I have just installed the application and gave camera permission to it, but when I close the app and start it again, everything works fine. I did a lot of searches, so what I found and tried- to Switch automatic graphics to OpenGls2, to set minimization to none, etc. Upgrading Vuforia version will not work for me. Also ARCamera works for phones supporting ARCore and does not work for phones not having ARCore. So I guess, the issue is within the architecture of the phone. Any ideas on how to make it work?
It must be related to camera API. I don't know how Vuforia is trying to initialize the camera. Seems like it tries to initialize it before successful permission result on old Android versions. You can delay Vuforia initialization to be after the permission check. There is an option to set Vuforia delayed initialization, but it would be better to make a preload scene where you do check all permissions and maybe other setup and then load the scene where Vuforia is used.
Update: Please try to update xr plugins for Unity (they are packages now), update Unity itself to the latest version. Do not use unity beta. Se if there are some recommendations from Vuforia of which unity version is the latest supported. Youc also try to create a new unity project from scratch and then import the latest vuforia, then try camera on android, then if all good, import all the resources for your app.

Hololens Spectator View Android Spatial Failure

I need to connect an Android device to a Hololens for 'spectator' viewing as in the sample 'Build 2019 Demo' code. However when I launch the Android and Hololens builds and enter the Hololens IP address on the Android side, all I see is an 'ArUco' code. No video and no 3D content are visible on the android device.
I should add that I have painstakingly reviewed the sample project as compared to my project and cannot determine any relevant differences.
Naturally, I want to get past this screen-code, but I am also confused about where this ArUco code exists in the application flow as it isn't part of any scene (or flow)that I am aware of.
The ArUco code is appearing in order to localize the two devices. If everything is compiled correctly, the HoloLens will start using its camera to detect the ArUco code. Once its detected, the ArUco code will be dismissed and content will be positioned correctly across the two devices. It may be that you are missing the OpenCV native plugins required for ArUco marker detection. Instructions on how to build those plugins can be found here. You specifically need an x86 version of SpectatorView.OpenCV.dll for ArUco detection to work on a HoloLens 1 device.
The Build2019 sample uses Azure Spatial Anchors compared to ArUco markers for localization. If you want to use Azure Spatial Anchors, you need to go to Spectator View -> Edit Settings and Add a SpatialAnchorsCoordinateLocalizationInitializer to the prefab. You also need to declare in the SpatialLocalizationInitializationSettings a Prioritized Initializer that references this SpatialAnchorsCoordinateLocalizationInitializer. This will cause the SpatialAnchorsCoordinateLocalizationInitializer to be used compared to the default ArUco localization initializer.
If you have set up these settings, it may be that the SpatialAnchorsLocalizer isn't registering as available on your Android or HoloLens device. You need to add the SPATIALALIGNMENT_ASA preprocessor directive to your Android and WSA Player Settings to get the SpatialAnchorsLocalizer to declare itself as supported.

OpenGL Native Plug-In Error with Unity on Android

I am on a Unity 5.6.5f1 project targeting Android 6.0. The project is VR enabled with Daydream without the gvr sdk since I do not need any interaction.
I noticed that most of the time, when I launch the application, I get the stereo view but everything is black, I do not even see the splash screen and in logcat I get the following error:
'E/Unity: OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_FRAMEBUFFER_OPERATION: Framebuffer is not complete or incompatible with command'
However, 30% of the time, when I launch the application it works fine and I do not get this error.
So basically I open and close the app until it is working..
Any idea where it could come from? I am using multi pass rendering.