Hi all. I have this code:
1. If i dont add in line #AdditionalJar: irlib-release.aar ---> ".aar" i have error that jar isnt exist
2. When i try to compile i have this error:
The library libIrLib-jni.so i have in aar as in picture:
In attachment also library aar ( rename zip to aar )
Any idea ?
Thank you
Marco
B4X:
#Region Project Attributes
#ApplicationLabel: Test AAR
#VersionCode: 1
#VersionName: 1.00
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#End Region
#AdditionalJar: irlib-release.aar
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim jo As JavaObject
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("1")
'Inizializzo oggetto JavaObject
If FirstTime Then jo.InitializeContext
' jo.InitializeNewInstance("com.rft.irlib.IrHandler", Null)
' 'jo.InitializeStatic("com.rft.irlib.IrHandler")
'PowerStart
Dim batteria, memtot, memused, nfile As Int
Dim sn, version As String
Dim temperature As Float
batteria = Cooffee.RunMethod("GetBattery", Null)
Log("Batteria: " & batteria)
memtot = Cooffee.RunMethod("GetMemTot", Null)
Log("MemTot: " & memtot)
memused = Cooffee.RunMethod("GetMemUsed", Null)
Log("MemUsed: " & memused)
nfile = Cooffee.RunMethod("GetNFile", Null)
Log("NFile: " & nfile)
sn = Cooffee.RunMethod("GetSN", Null)
Log("SN: " & sn)
version = Cooffee.RunMethod("GetVersion", Null)
Log("Version: " & version)
temperature = Cooffee.RunMethod("GetTemperature", Null)
Log("Temperature: " & temperature)
End Sub
Sub GetContext As JavaObject
Return GetBA.GetField("context")
End Sub
Sub GetBA As JavaObject
Dim jo As JavaObject
Dim cls As String = Me
cls = cls.SubString("class ".Length)
jo.InitializeStatic(cls)
Return jo.GetFieldJO("processBA")
End Sub
Sub Cooffee As JavaObject
Dim jo As JavaObject
Return jo.InitializeStatic("com.rft.irlib.IrHandler")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
1. If i dont add in line #AdditionalJar: irlib-release.aar ---> ".aar" i have error that jar isnt exist
2. When i try to compile i have this error:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/cooffee.testonlinecode-2/base.apk"],nativeLibraryDirectories=[/data/app/cooffee.testonlinecode-2/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libIrLib-jni.so"
The library libIrLib-jni.so i have in aar as in picture:
In attachment also library aar ( rename zip to aar )
Any idea ?
Thank you
Marco
Attachments
Last edited: