Android Question #Additionaljar - is not accessible from class

MarcoRome

Expert
Licensed User
Longtime User
Hi all. I have this code:

B4X:
jo.InitializeNewInstance("com.rft.irlib.IrPower", Null)
   
    'PowerStart
    Dim d As Boolean
    d = jo.RunMethod("IrPowerStart", Null)
 
    Log("Return = " & d)

Immagine1.png



And i have this error:

java.lang.IllegalAccessException: class com.rft.irlib.IrPower is not accessible from class anywheresoftware.b4j.object.JavaObject

** Service (starter) Create **~i:** Service (starter) Start **~i:** Activity (main) Create, isFirst = true **
main_activity_create (java line: 323)
java.lang.IllegalAccessException: class com.rft.irlib.IrPower is not accessible from class anywheresoftware.b4j.object.JavaObject
at java.lang.Class.newInstance(Class.java:1591)
at anywheresoftware.b4j.object.JavaObject.InitializeNewInstance(JavaObject.java:84)
at b4a.example.main._activity_create(main.java:323)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at b4a.example.main.afterFirstLayout(main.java:102)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

Any idea ?
Thanks
Marco
 
Top