Log in or register to post comments

NoSuchMethodError in sample app

February 28, 2012 - 11:51pm #1

Hi,

I tried to build the Simple Project described in the dev guide using the new 1.5.10 Unity plugin.

The app crashed immediately because the invocation of windowFocusChanged threw an NoSuchMethodError. Here's the stack trace:

02-29 08:33:58.722: E/AndroidRuntime(13451): FATAL EXCEPTION: main
02-29 08:33:58.722: E/AndroidRuntime(13451): java.lang.NoSuchMethodError: com.unity3d.player.UnityPlayer.windowFocusChanged
02-29 08:33:58.722: E/AndroidRuntime(13451): 	at com.qualcomm.QCARUnityPlayer.QCARPlayerSharedActivity.onWindowFocusChanged(QCARPlayerSharedActivity.java:345)
02-29 08:33:58.722: E/AndroidRuntime(13451): 	at com.qualcomm.QCARUnityPlayer.QCARPlayerNativeActivity.onWindowFocusChanged(QCARPlayerNativeActivity.java:77)
02-29 08:33:58.722: E/AndroidRuntime(13451): 	at com.android.internal.policy.impl.PhoneWindow$DecorView.onWindowFocusChanged(PhoneWindow.java:2068)
02-29 08:33:58.722: E/AndroidRuntime(13451): 	at android.view.View.dispatchWindowFocusChanged(View.java:3971)
02-29 08:33:58.722: E/AndroidRuntime(13451): 	at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:677)
02-29 08:33:58.722: E/AndroidRuntime(13451): 	at android.view.ViewRoot.handleMessage(ViewRoot.java:2096)
02-29 08:33:58.722: E/AndroidRuntime(13451): 	at android.os.Handler.dispatchMessage(Handler.java:99)
02-29 08:33:58.722: E/AndroidRuntime(13451): 	at android.os.Looper.loop(Looper.java:143)
02-29 08:33:58.722: E/AndroidRuntime(13451): 	at android.app.ActivityThread.main(ActivityThread.java:4196)
02-29 08:33:58.722: E/AndroidRuntime(13451): 	at java.lang.reflect.Method.invokeNative(Native Method)
02-29 08:33:58.722: E/AndroidRuntime(13451): 	at java.lang.reflect.Method.invoke(Method.java:507)
02-29 08:33:58.722: E/AndroidRuntime(13451): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
02-29 08:33:58.722: E/AndroidRuntime(13451): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
02-29 08:33:58.722: E/AndroidRuntime(13451): 	at dalvik.system.NativeStart.main(Native Method)
02-29 08:33:58.742: W/ActivityManager(1339):   Force finishing activity com.qualcomm.QCARUnityPlayer/.QCARPlayerNativeActivity

I'm using Unity 3.4.0f5 and a HTC Desire Z running Android 2.3.3.

Any help on this issue is much appreciated.

Re: NoSuchMethodError in sample app

February 29, 2012 - 11:39pm #4

@David: With the 1.5.4 packages I was able to successfully deploy AR applications for Android.
@Kim: Upgrading Unity to 3.5 did the trick, the app works just fine.

Thanks! :)

Re: NoSuchMethodError in sample app

February 29, 2012 - 3:29pm #3

I think you've found a bug with older Unity version support. Try upgrading to the latest version of Unity 3.4. Unity 3.5 is also supported.

- Kim

Re: NoSuchMethodError in sample app

February 29, 2012 - 7:18am #2

Are you able to build other Android projects that don't use QCAR from this installation? - I'm trying to isolate whether this is a problem w/ the set-up of your Unity Android environment, or something specific to Vuforia.

Log in or register to post comments