Author Topic: Exception Java Failed error  (Read 2840 times)

yangchongze00

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Exception Java Failed error
« on: August 04, 2015, 07:42:57 PM »
I got error when I want to build my game out as flash, so is like this:


C:\Users\Chongze\Documents\BextrAAAMatchingInUnity4\Temp\StagingArea\Data\ConvertedDotNetCode\global\UIWidget.as(102): col: 17 Error: Call to a possibly undefined method op_Inequality through a reference with static type Class.


Error building Player: Exception: java Failed:
Loading configuration file C:\Program Files (x86)\Unity4\Editor\Data\PlaybackEngines\flashsupport\BuildTools\flex\frameworks\flex-config.xml

C:\Users\Chongze\Documents\BextrAAAMatchingInUnity4\Temp\StagingArea\Data\ConvertedDotNetCode\global\UIWidget.as(102): col: 17 Error: Call to a possibly undefined method op_Inequality through a reference with static type Class.

         if (Function.op_Inequality(this.UIWidget$mOnRender$, $value)) {
                      ^
Any ideas I can solve this problem?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Exception Java Failed error
« Reply #1 on: August 05, 2015, 09:03:02 AM »
The code in question is wrapped in an #if block excluding it from Flash:
  1. #if !UNITY_FLASH
  2.                                 if (drawCall != null && drawCall.onRender != null && mOnRender != null)
  3.                                         drawCall.onRender -= mOnRender;
  4. #endif
Did you forget to update?

yangchongze00

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: Exception Java Failed error
« Reply #2 on: August 05, 2015, 01:43:37 PM »
I upload NGUI to latest, but I still have the problem below.

C:\Users\Chongze\Documents\BextrAAAMatchingInUnity4\Temp\StagingArea\Data\ConvertedDotNetCode\global\Localization.as(221): col: 16 Error: Call to a possibly undefined method CLIArray_Resize$1_TArrayRef_Int32 through a reference with static type Class.


C:\Users\Chongze\Documents\BextrAAAMatchingInUnity4\Temp\StagingArea\Data\ConvertedDotNetCode\global\UIKeyBinding.as(106): col: 34 Warning: Class used where a Boolean value was expected.  The expression will be type coerced to Boolean.


C:\Users\Chongze\Documents\BextrAAAMatchingInUnity4\Temp\StagingArea\Data\ConvertedDotNetCode\global\UIKeyBinding.as(107): col: 35 Warning: Class used where a Boolean value was expected.  The expression will be type coerced to Boolean.


Error building Player: Exception: java Failed:
Loading configuration file C:\Program Files (x86)\Unity4\Editor\Data\PlaybackEngines\flashsupport\BuildTools\flex\frameworks\flex-config.xml

C:\Users\Chongze\Documents\BextrAAAMatchingInUnity4\Temp\StagingArea\Data\ConvertedDotNetCode\global\Localization.as(221): col: 16 Error: Call to a possibly undefined method CLIArray_Resize$1_TArrayRef_Int32 through a reference with static type Class.

                  CLIArray.CLIArray_Resize$1_TArrayRef_Int32(new ByRef((function(): CLIObjectArray {
                           ^

C:\Users\Chongze\Documents\BextrAAAMatchingInUnity4\Temp\StagingArea\Data\ConvertedDotNetCode\global\UIKeyBinding.as(106): col: 34 Warning: Class used where a Boolean value was expected.  The expression will be type coerced to Boolean.

         var $flag: Boolean = UICamera.UICamera$GetKeyDown$(this.UIKeyBinding$keyCode$);
                                       ^

C:\Users\Chongze\Documents\BextrAAAMatchingInUnity4\Temp\StagingArea\Data\ConvertedDotNetCode\global\UIKeyBinding.as(107): col: 35 Warning: Class used where a Boolean value was expected.  The expression will be type coerced to Boolean.

         var $flag2: Boolean = UICamera.UICamera$GetKeyUp$(this.UIKeyBinding$keyCode$);
                                        ^



yangchongze00

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: Exception Java Failed error
« Reply #3 on: August 05, 2015, 06:07:54 PM »
Is there any way I can solve this problem ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Exception Java Failed error
« Reply #4 on: August 08, 2015, 11:15:21 PM »
In Localization.cs replace line 304 with this:
  1. #if UNITY_FLASH
  2.                                         string[] temp = new string[newSize];
  3.                                         for (int b = 0, bmax = arr.Length; b < bmax; ++b) temp[b] = mLanguages[b];
  4.                                         mLanguages = temp;
  5. #else
  6.                                         System.Array.Resize(ref mLanguages, newSize); // <-- this is the old line that's there now
  7. #endif
In UIKeyBinding.cs replace line 132 and 134 with this:
  1. #if UNITY_FLASH
  2.                 bool keyDown = Input.GetKeyDown(keyCode);
  3.                 bool keyUp = Input.GetKeyUp(keyCode);
  4. #else
  5.                 bool keyDown = UICamera.GetKeyDown(keyCode); // <-- existing lines
  6.                 bool keyUp = UICamera.GetKeyUp(keyCode); // <-- existing lines
  7. #endif

yangchongze00

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: Exception Java Failed error
« Reply #5 on: August 10, 2015, 04:46:08 PM »
I think the first part, you should change it to

  1.  
  2. #if UNITY_FLASH
  3.                     string[] temp_1 = new string[newSize];
  4.                     for (int b = 0, bmax = mLanguages.Length; b < bmax; ++b) temp_1[b] = mLanguages[b];
  5.                     mLanguages = temp_1;
  6. #else
  7.                     System.Array.Resize(ref mLanguages, newSize); // <-- this is the old line that's there now
  8. #endif
  9.  
  10.  


or it still makes some error