rawan
rawan

Reputation: 3

QCAR initialization failed : unity 3d

I'm working on an augmented reality project with Unity 3d using Vuforia

I included ARcamera in addition imageTargit

Then I added 3D-Model to imageTarget

when I run the program it shows the following error:

enter image description here

Upvotes: 0

Views: 1491

Answers (2)

Tamo
Tamo

Reputation: 11

OK, so, basically here Unity is automatically injecting the targetSDKversion into the generated AndroidManifest.xml, setting it to API level "23" (which means Android 6.0 API).

But API level 23 requires explicit camera access from the user, hence the error.

To fix this, you simply need to add this line into the AndroidManifest.xml under Assets/Plugins/Android, setting the targetSDKversion to a value lower than 23 (e.g. set it to 21 or 22):

This will make it work on any device (including those on Android 6.0, as well as the ones on older versions, down to the minSDKVersion you have set)

Upvotes: 0

Luis Alberto Castro
Luis Alberto Castro

Reputation: 26

I've been trying for a long time to solve this issue, and this worked for me. Across the Vuforia support forum I´ve read that in older versions of Vuforia this issue did not happen, that's because in that versions the ARCamera prefab was just one object, in other words, it had no childs. The Vuforia 4 ARCamera prefab has a child, and I noted that those objects has attached one script called QCarBehaviour. The solution is just to disable the script in the child of the ARCamera prefab. In that way, QCar just initialize once and all works fine.

Sorry for my bad english lol. Hope it helped you :)

Upvotes: 1

Related Questions