java.lang.ArrayIndexOutOfBoundsException: length=0; index=0

Appcelerator JIRA | Brian García | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    When trying to instantiate BluetoothGattDescriptior {code:java} var BGD = new BluetoothGattDescriptor(); {code} the following error log appears : {code:java} [WARN] : W/System.err: java.lang.NoSuchMethodException: <init> [] [WARN] : W/System.err: at java.lang.Class.getConstructor(Class.java:531) [WARN] : W/System.err: at java.lang.Class.getConstructor(Class.java:495) [WARN] : W/System.err: at hyperloop.HyperloopUtil.resolveConstructor(HyperloopUtil.java:297) [WARN] : W/System.err: at hyperloop.ClassProxy.newInstance(ClassProxy.java:80) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:57) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.handleMessage(V8Function.java:82) [WARN] : W/System.err: at android.os.Handler.dispatchMessage(Handler.java:98) [WARN] : W/System.err: at android.os.Looper.loop(Looper.java:145) [WARN] : W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5951) [WARN] : W/System.err: at java.lang.reflect.Method.invoke(Native Method) [WARN] : W/System.err: at java.lang.reflect.Method.invoke(Method.java:372) [WARN] : W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400) [WARN] : W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195) [WARN] : W/System.err: java.lang.ArrayIndexOutOfBoundsException: length=0; index=0 [WARN] : W/System.err: at hyperloop.HyperloopUtil.convert(HyperloopUtil.java:166) [WARN] : W/System.err: at hyperloop.ClassProxy.newInstance(ClassProxy.java:89) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:57) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.handleMessage(V8Function.java:82) [WARN] : W/System.err: at android.os.Handler.dispatchMessage(Handler.java:98) [WARN] : W/System.err: at android.os.Looper.loop(Looper.java:145) [WARN] : W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5951) [WARN] : W/System.err: at java.lang.reflect.Method.invoke(Native Method) [WARN] : W/System.err: at java.lang.reflect.Method.invoke(Method.java:372) [WARN] : W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400) [WARN] : W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195) [ERROR] : TiExceptionHandler: (main) [15625,21062] ----- Titanium Javascript Runtime Error ----- [ERROR] : TiExceptionHandler: (main) [1,21063] - In hyperloop/android.bluetooth.BluetoothGattDescriptor.js:1,69 [ERROR] : TiExceptionHandler: (main) [1,21064] - Message: Uncaught Error: length=0; index=0 [ERROR] : TiExceptionHandler: (main) [1,21065] - Source: ame?arguments[0]:android.bluetooth.BluetoothGattDescriptor["class"].newInstanc [ERROR] : V8Exception: Exception occurred at hyperloop/android.bluetooth.BluetoothGattDescriptor.js:1: Uncaught Error: length=0; index=0 {code} Other issue is related with BluetoothGattCharacteristic, when trying to access it's methods, instantiate or cast the following error shows up: {code:java} [ERROR] : TiExceptionHandler: (main) [12908,12908] ----- Titanium Javascript Runtime Error ----- [ERROR] : TiExceptionHandler: (main) [1,12909] - In ti:/module.js:280,9 [ERROR] : TiExceptionHandler: (main) [0,12909] - Message: Uncaught Error: Requested module not found: [B [ERROR] : TiExceptionHandler: (main) [1,12910] - Source: throw new Error("Requested module not found: " + request); [ERROR] : V8Exception: Exception occurred at ti:/module.js:280: Uncaught Error: Requested module not found: [B {code}

    Appcelerator JIRA | 1 year ago | Brian García
    java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
  2. 0

    When trying to instantiate BluetoothGattDescriptior {code:java} var BGD = new BluetoothGattDescriptor(); {code} the following error log appears : {code:java} [WARN] : W/System.err: java.lang.NoSuchMethodException: <init> [] [WARN] : W/System.err: at java.lang.Class.getConstructor(Class.java:531) [WARN] : W/System.err: at java.lang.Class.getConstructor(Class.java:495) [WARN] : W/System.err: at hyperloop.HyperloopUtil.resolveConstructor(HyperloopUtil.java:297) [WARN] : W/System.err: at hyperloop.ClassProxy.newInstance(ClassProxy.java:80) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:57) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.handleMessage(V8Function.java:82) [WARN] : W/System.err: at android.os.Handler.dispatchMessage(Handler.java:98) [WARN] : W/System.err: at android.os.Looper.loop(Looper.java:145) [WARN] : W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5951) [WARN] : W/System.err: at java.lang.reflect.Method.invoke(Native Method) [WARN] : W/System.err: at java.lang.reflect.Method.invoke(Method.java:372) [WARN] : W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400) [WARN] : W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195) [WARN] : W/System.err: java.lang.ArrayIndexOutOfBoundsException: length=0; index=0 [WARN] : W/System.err: at hyperloop.HyperloopUtil.convert(HyperloopUtil.java:166) [WARN] : W/System.err: at hyperloop.ClassProxy.newInstance(ClassProxy.java:89) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:57) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.handleMessage(V8Function.java:82) [WARN] : W/System.err: at android.os.Handler.dispatchMessage(Handler.java:98) [WARN] : W/System.err: at android.os.Looper.loop(Looper.java:145) [WARN] : W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5951) [WARN] : W/System.err: at java.lang.reflect.Method.invoke(Native Method) [WARN] : W/System.err: at java.lang.reflect.Method.invoke(Method.java:372) [WARN] : W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400) [WARN] : W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195) [ERROR] : TiExceptionHandler: (main) [15625,21062] ----- Titanium Javascript Runtime Error ----- [ERROR] : TiExceptionHandler: (main) [1,21063] - In hyperloop/android.bluetooth.BluetoothGattDescriptor.js:1,69 [ERROR] : TiExceptionHandler: (main) [1,21064] - Message: Uncaught Error: length=0; index=0 [ERROR] : TiExceptionHandler: (main) [1,21065] - Source: ame?arguments[0]:android.bluetooth.BluetoothGattDescriptor["class"].newInstanc [ERROR] : V8Exception: Exception occurred at hyperloop/android.bluetooth.BluetoothGattDescriptor.js:1: Uncaught Error: length=0; index=0 {code} Other issue is related with BluetoothGattCharacteristic, when trying to access it's methods, instantiate or cast the following error shows up: {code:java} [ERROR] : TiExceptionHandler: (main) [12908,12908] ----- Titanium Javascript Runtime Error ----- [ERROR] : TiExceptionHandler: (main) [1,12909] - In ti:/module.js:280,9 [ERROR] : TiExceptionHandler: (main) [0,12909] - Message: Uncaught Error: Requested module not found: [B [ERROR] : TiExceptionHandler: (main) [1,12910] - Source: throw new Error("Requested module not found: " + request); [ERROR] : V8Exception: Exception occurred at ti:/module.js:280: Uncaught Error: Requested module not found: [B {code}

    Appcelerator JIRA | 1 year ago | Brian García
    java.lang.ArrayIndexOutOfBoundsException: length=0; index=0

    Root Cause Analysis

    1. java.lang.ArrayIndexOutOfBoundsException

      length=0; index=0

      at hyperloop.HyperloopUtil.convert()
    2. hyperloop
      ClassProxy.newInstance
      1. hyperloop.HyperloopUtil.convert(HyperloopUtil.java:166)
      2. hyperloop.ClassProxy.newInstance(ClassProxy.java:89)
      2 frames
    3. org.appcelerator.kroll
      V8Function.handleMessage
      1. org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method)
      2. org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:57)
      3. org.appcelerator.kroll.runtime.v8.V8Function.handleMessage(V8Function.java:82)
      3 frames
    4. Android Platform
      ActivityThread.main
      1. android.os.Handler.dispatchMessage(Handler.java:98)
      2. android.os.Looper.loop(Looper.java:145)
      3. android.app.ActivityThread.main(ActivityThread.java:5951)
      3 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
      2 frames