Author Topic: Exception Java Failed  (Read 2454 times)

Lustabel

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 5
    • View Profile
Exception Java Failed
« on: September 03, 2014, 05:28:23 AM »
Good Morning,

I just installed NGUI3 v3.6.9 and I just imported it to an empty project.
When I try to compile any scene to Flash Player I get the next errors:


C:\Users\Admin\Documents\Area GUI\Temp\StagingArea\Data\ConvertedDotNetCode\global\UILabel.as(763): col: 38 Error: Call to a possibly undefined method String_LastIndexOfAny_CharArray_Int32 through a reference with static type Class.

C:\Users\Admin\Documents\Area GUI\Temp\StagingArea\Data\ConvertedDotNetCode\global\UILabel.as(764): col: 39 Error: Call to a possibly undefined method String_IndexOfAny_CharArray_Int32 through a reference with static type Class.

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

C:\Users\Admin\Documents\Area GUI\Temp\StagingArea\Data\ConvertedDotNetCode\global\UILabel.as(763): col: 38 Error: Call to a possibly undefined method String_LastIndexOfAny_CharArray_Int32 through a reference with static type Class.
            var $num: int = StringOperations.String_LastIndexOfAny_CharArray_Int32(this.UILabel$mText$, CLIArrayFactory.NewArrayWithElements(Type.ForClass(int), 32, 10), $characterIndex) + 1;
                                             ^
C:\Users\Admin\Documents\Area GUI\Temp\StagingArea\Data\ConvertedDotNetCode\global\UILabel.as(764): col: 39 Error: Call to a possibly undefined method String_IndexOfAny_CharArray_Int32 through a reference with static type Class.
            var $num2: int = StringOperations.String_IndexOfAny_CharArray_Int32(this.UILabel$mText$, CLIArrayFactory.NewArrayWithElements(Type.ForClass(int), 32, 10, 44, 46), $characterIndex);
                                             ^


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Exception Java Failed
« Reply #1 on: September 03, 2014, 11:52:30 AM »
Please update to the latest first. You're 2 versions behind.

Lustabel

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Exception Java Failed
« Reply #2 on: September 10, 2014, 03:11:11 PM »
I updated up to version 3.7.1 and started a new project, then imported NGUI.

The new error is:

Assets/NGUI/Scripts/Internal/EventDelegate.cs(110,83): error CS1061: Type `object' does not contain a definition for `GeType' and no extension method `GeType' of type `object' could be found (are you missing a using directive or an assembly reference?)


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Exception Java Failed
« Reply #3 on: September 11, 2014, 01:42:32 AM »
That seems like a typo. It should be GetType, not GeType.

Lustabel

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Exception Java Failed
« Reply #4 on: September 13, 2014, 10:55:03 AM »
I-ve ben getting more errors, finally I decided to update again, and I got a new error.

NGUI v3.7.2
Unity v4.5.4f1

New error:

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

C:\Users\Admin\Documents\New Unity Project\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)) {
                      ^


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Exception Java Failed
« Reply #5 on: September 14, 2014, 03:27:00 AM »
For whatever reason, I can't seem to build for flash anymore. I keep getting the "Java not found" error, even though I obviously have Java installed.

Looks like Flash doesn't understand a simple inequality check with a delegate. Change UIWidget.onRender to this:
  1.         public UIDrawCall.OnRenderCallback onRender
  2.         {
  3.                 get
  4.                 {
  5.                         return mOnRender;
  6.                 }
  7.                 set
  8.                 {
  9.                         if (mOnRender != value)
  10.                         {
  11. #if !UNITY_FLASH
  12.                                 if (drawCall != null && drawCall.onRender != null && mOnRender != null)
  13.                                         drawCall.onRender -= mOnRender;
  14. #endif
  15.                                 mOnRender = value;
  16.                                 if (drawCall != null) drawCall.onRender += value;
  17.                         }
  18.                 }
  19.         }