Log in or register to post comments

Vuforia fails to initialize when deployed to Android (BlackScreen)

July 3, 2018 - 8:55am #1


I am currently upgrading a Vuforia based Unity project from Vuforia 6.2 to 7.1.35

However I am unable to build a working version of the project onto an Android device now that I have updated the Vuforia version the project uses.

All I see when I go to scan something, is a black screen.

When I check the logs it appears that Vuforia is failing to initialize:

- - - - - - -

AndroidJavaException: java.lang.ClassNotFoundException: com.vuforia.VuforiaUnityPlayer.VuforiaInitializer

java.lang.ClassNotFoundException: com.vuforia.VuforiaUnityPlayer.VuforiaInitializer

at java.lang.Class.classForName(Native Method)

at java.lang.Class.forName(Class.java:400)

at java.lang.Class.forName(Class.java:326)

at com.unity3d.player.UnityPlayer.nativeRender(Native Method)

at com.unity3d.player.UnityPlayer.c(Unknown Source)

at com.unity3d.player.UnityPlayer$d$1.handleMessage(Unknown Source)

at android.os.Handler.dispatchMessage(Handler.java:98)

at android.os.Looper.loop(Looper.java:154)

at com.unity3d.player.UnityPlayer$d.run(Unknown Source)

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.vuforia.VuforiaUnityPlayer.VuforiaInitializer" on path: DexPathList[[zip file "/data/app/APPID-1/base.apk"],nativeLibraryDirectories=[/data/app/APPID-1/lib/arm, /data/app/APPID-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]

at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

at java.lang.ClassLoader.loadClass(ClassLoader.java:380)

at java.lang.ClassLoader.loadClass(ClassLoader.java:312)

... 9 more

  at UnityEngine.AndroidJNISafe.CheckException () [0x0008c] in /Users/builduser/buildslave/unity/build/Runtime/Export/AndroidJNISafe.cs:24

  at UnityEngine.AndroidJNISafe.CallStaticObjectMethod (IntPtr clazz, IntPtr methodID, UnityEngine.jvalue[] args) [0x00011] in /Users/builduser/buildslave/unity/build/Runtime/Export/AndroidJNISafe.cs:207

  at UnityEngine.AndroidJavaObject._CallStatic[AndroidJavaObject] (System.String methodName, System.Object[] args) [0x002d8] in /Users/builduser/buildslave/unity/build/Runtime/Export/AndroidJavaImpl.cs:460

  at UnityEngine.AndroidJavaObject.CallStatic[AndroidJavaObject] (System.String methodName, System.Object[] args) [0x00004] in /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/AndroidJavaBindings.gen.cs:82

  at UnityEngine.AndroidJavaObject.FindClass (System.String name) [0x0001e] in /Users/builduser/buildslave/unity/build/Runtime/Export/AndroidJavaImpl.cs:591

  at UnityEngine.AndroidJavaClass._AndroidJavaClass (System.String className) [0x00013] in /Users/builduser/buildslave/unity/build/Runtime/Export/AndroidJavaImpl.cs:611

  at UnityEngine.AndroidJavaClass..ctor (System.String className) [0x00009] in /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/AndroidJavaBindings.gen.cs:92

  at Vuforia.AndroidUnityPlayer.LoadNativeLibrariesFromJava () [0x00000] in <filename unknown>:0

  at Vuforia.AndroidUnityPlayer.InitAndroidPlatform () [0x00000] in <filename unknown>:0

  at Vuforia.AndroidUnityPlayer.InitializePlatform () [0x00000] in <filename unknown>:0

  at Vuforia.VuforiaRuntime.InitPlatform (IUnityPlayer player) [0x00000] in <filename unknown>:0

  at Vuforia.PlatformRuntimeInitialization.InitPlatform () [0x00000] in <filename unknown>:0

(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/AndroidJNISafe.cs Line: 24)

- - - - - - -

Does anyone know what could possibly be causing this error/behaviour?



Vuforia fails to initialize when deployed to Android (BlackScreen)

July 19, 2018 - 1:18am #5

Hi Strasza,

I figured out that this problem was simply being caused by a directory naming issue, where a * was being used where it shouldn't have been.

This didn't appear to prevent Vuforia 6.2 from working but now prevents Vuforia 6.5+ from being compiled properly.



Vuforia fails to initialize when deployed to Android (BlackScreen)

July 11, 2018 - 12:15pm #4

I am seeing this issue in Unity 2018.1 and Unity 2018.2. I have Vuforia 7.2.20 installed. When running on Android the logs state it cannot find the Dll files for Vuforia.

Vuforia fails to initialize when deployed to Android (BlackScreen)

July 9, 2018 - 11:54am #3

Hello SmithDavis,

Are you seeing this in any new projects created in 7.1.35? We have migration guides in our Library such as this one: https://library.vuforia.com/content/vuforia-library/en/articles/Solution/migrate-vuforia-62-to-65.html Can you confirm that you followed such steps?


Vuforia Support

Vuforia fails to initialize when deployed to Android (BlackScreen)

July 4, 2018 - 12:51am #2

Same here.


Unity 2018.1.0f2

Vuforia 7.2.20

Android build using IL2CPP


AndroidJavaException: java.lang.ClassNotFoundException: com.vuforia.VuforiaUnityPlayer.VuforiaInitializer


Note: Vuforia works correctly when built on debug mode.


What is happening?



Log in or register to post comments