Database load error vuforia

Hi, I am using Vuforia 10.8 Area Target with Unity 2020.3.6f1, Building the app with IL2CPP arm64 in Android. I want to load the Area Target in run time using VuforiaBehaviour.Instance.ObserverFactory.CreateAreaTarget(path, name).

Hi, I am using Vuforia 10.8 Area Target with Unity 2020.3.6f1, Building the app with IL2CPP arm64 in Android.

I want to load the Area Target in run time using VuforiaBehaviour.Instance.ObserverFactory.CreateAreaTarget(path, name).

My path is declared exactly the same with the VuforiaSampleProject:

var FullPath = Path.Combine(Application.streamingAssetsPath, mDataSetUnit.Path);

var pathToTheXML = Path.Combine(FullPath, mDataSetUnit.Name + EXTENSION_FORMAT_XML.Remove(0, 1));

mAreaTargetBehaviour = VuforiaBehaviour.Instance.ObserverFactory.CreateAreaTarget(pathToTheXML, mDataSetUnit.Name, false);

I have tested the app on iOS and the simulator mode in Unity Editor, which are working fine. 

But in Android (I am using S9), it cannot create the AreaTargetObserver as it show the following error:

ObserverNotCreatedException`1: Failed to create AreaTargetObserver: DATABASE_LOAD_ERROR. Vuforia.Internal.Core.ObserverFactory.CreateAreaTargetObserver (Vuforia.Internal.Observers.DeviceObserver deviceObserver, System.String dataSetPath, System.String targetName, System.Boolean requiresExternalPositions) (at <00000000000000000000000000000000>:0) Vuforia.ObserverFactory.CreateAreaTarget (System.String databasePath, System.String targetName, System.Boolean requiresExternalPositions) (at <00000000000000000000000000000000>:0) AreaTargetLoader.LoadAreaTarget (DatasetUnit mDataSetUnit) (at <00000000000000000000000000000000>:0) AreaTarget_MainManager.StartScanning () (at <00000000000000000000000000000000>:0)

Things I have tried: 

— reinstall Vuforia and double checking the licenses is valid.

— I tried just placing the area target in the scene, in the build it is working fine, but the one loading in runtime gives the error.

— I wonder if it is related to the streaming asset path issue on Android, so I tried to copy the XML and DAT files from the streaming asset to persistentDataPath at Start(). Reading the absolute path of the XMLfile, still I am getting the DATABASE_LOAD_ERROR.

I wonder what is causing the issue and how can I fix it?

Thanks for your time, any help would be great, have a great day.

I am working in unity 2017.03 with Vuforia 7.04 V.

My problem is my apk size 120mb+ so I had to try to split the binary and upload it to the google play store.

Before splitting the application was working perfectly, but after splitting it’s not working except the AR scenes are all working fine.

On testing consol in mobile I get this error :

fail to load dataset /storage/emulated0/Android/data/com.xyz.game/files/QCAR/dbname.xml

after google search I got this code

private IEnumerator ExtractObbDatasets () {
    string[] filesInOBB = {"FriendsJungle_DB.dat", "FriendsJungle_DB.xml"};
    foreach (var filename in filesInOBB) {
        string uri = Application.streamingAssetsPath + "/QCAR/" + filename;

        string outputFilePath = Application.persistentDataPath + "/QCAR/" + filename;
        if(!Directory.Exists(Path.GetDirectoryName(outputFilePath)))
            Directory.CreateDirectory(Path.GetDirectoryName(outputFilePath));

        var www = new WWW(uri);
        yield return www;

        Save(www, outputFilePath);
        yield return new WaitForEndOfFrame();
    }

    // When done extracting the datasets, Start Vuforia AR scene
    SceneManager.LoadScene("Home"); 

}

private void Save(WWW www, string outputPath) {
    File.WriteAllBytes(outputPath,www.bytes);

    // Verify that the File has been actually stored
    if(File.Exists(outputPath))
        Debug.Log("File successfully saved at: " + outputPath);
    else
        Debug.Log("Failure!! - File does not exist at: " + outputPath);
}

But no luck, still get the same error same.

Someone help me, please!

I am using this as reference

Я работаю в единстве 2017.03 с Vuforia 7.04 V.

Моя проблема — мой размер apk 120mb+, поэтому мне пришлось попытаться разбить двоичный файл и загрузить его в магазин игр Google.

Перед распаковкой приложение работало отлично, но после разделения оно не работает, кроме AR-сцен, все работают нормально.

При тестировании консоли в мобильном я получаю эту ошибку:

не загружать dataset/storage/emulated0/Android/data/com.xyz.game/files/QCAR/dbname.xml

после google search я получил этот код

private IEnumerator ExtractObbDatasets () {
string[] filesInOBB = {"FriendsJungle_DB.dat", "FriendsJungle_DB.xml"};
foreach (var filename in filesInOBB) {
string uri = Application.streamingAssetsPath + "/QCAR/" + filename;

string outputFilePath = Application.persistentDataPath + "/QCAR/" + filename;
if(!Directory.Exists(Path.GetDirectoryName(outputFilePath)))
Directory.CreateDirectory(Path.GetDirectoryName(outputFilePath));

var www = new WWW(uri);
yield return www;

Save(www, outputFilePath);
yield return new WaitForEndOfFrame();
}

// When done extracting the datasets, Start Vuforia AR scene
SceneManager.LoadScene("Home");

}

private void Save(WWW www, string outputPath) {
File.WriteAllBytes(outputPath,www.bytes);

// Verify that the File has been actually stored
if(File.Exists(outputPath))
Debug.Log("File successfully saved at: " + outputPath);
else
Debug.Log("Failure!! - File does not exist at: " + outputPath);
}

Но не повезло, все равно получилась такая же ошибка.

Кто-нибудь мне поможет, пожалуйста!

Я использую это как ссылку

Hi there,

I have a problem with an error wich occurs with my Unity3D projekt. I’m using Vuforia to make an AR app and can not figure out what i have to do to stop this error.

Exception in callback: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.NullReferenceException: Object reference not set to an instance of an object at Vuforia.BackgroundPlaneAbstractBehaviour.CreateAndSetVideoMesh () [0x00000] in <filename unknown>:0 at Vuforia.BackgroundPlaneAbstractBehaviour.OnTrackablesUpdated () [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000d0] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222 — End of inner exception stack trace — at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000eb] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115 at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000b9] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Delegate.cs:443 at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00018] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/MulticastDelegate.cs:71 at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Delegate.cs:415 at Vuforia.DelegateHelper.InvokeDelegate (System.Delegate action, System.Object[] args) [0x00000] in <filename unknown>:0 UnityEngine.Debug:LogError(Object) Vuforia.DelegateHelper:InvokeDelegate(Delegate, Object[]) Vuforia.DelegateHelper:InvokeWithExceptionHandling(Action) Vuforia.VuforiaARController:UpdateStatePrivate(Boolean, Boolean) Vuforia.VuforiaARController:UpdateState(Boolean, Boolean) Vuforia.DigitalEyewearARController:Update() System.Delegate:DynamicInvoke(Object[]) Vuforia.DelegateHelper:InvokeDelegate(Delegate, Object[]) Vuforia.DelegateHelper:InvokeWithExceptionHandling(Action) Vuforia.VuforiaAbstractBehaviour:Update()

thanks for your help.

Здравствуйте!
Я, увы, новичок, но искренне надеялась, что первое самое простенькое приложение скомпилирую без проблем, но увы.
Установив самые новые SDK, JDK, настроив самое простое приложение (отображение объекта на поверхности — 1 объект (анимашка FBX) — один TargetImage — одна ARCamera.

При компиляции выдает вот такие ошибки:
UnityEditor.BuildPlayerWindow+BuildMethodException : 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods. BuildPlayer (BuildPlayerOptions options) [0x0021f] in C:buildslaveunitybuildEditorMonoBuildPlayerW indowBuildMethods.cs:187
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x0007f] in C:buildslaveunitybuildEditorMonoBuildPlayerW indowBuildMethods.cs:94
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Скриншот сцены и ошибок прикрепила.

Пожалуйста, помогите мне.

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Dayz memory error
  • Dayz launcher ошибка 103
  • Database error value received
  • Dayz launcher sa steam error
  • Database error unable to connect to the database could not connect to mysql перевод

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии