Java Question UXCam - invokedynamic requires --min-sdk-version >= 26

cholo

Member
Licensed User
Hello!

I want to use UXCam (https://uxcam.com) with #AdditionalJar and JavaObject.

This is uxcam-3.3.7.jar file and the documentation is attached.

The B4A code is:
B4X:
#Region  Project Attributes
    #ApplicationLabel: B4A Example
    #VersionCode: 1
    #VersionName: 100
    #SupportedOrientations: portrait
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
    #MultiDex: True   
    #BridgeLogger: True
    #AdditionalJar: com.android.support:support-v4
    #AdditionalJar: uxcam-3.3.7
#End Region

Sub Process_Globals

End Sub

Sub Globals
    Dim UXCam As JavaObject
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("Layout")
    UXCam.InitializeNewInstance("com.uxcam.UXCam", Null).RunMethod("startWithKey", Array("MY_API_KEY"))
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

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

My manifest is:
Manifest:
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="30"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)

AddPermission(android.permission.INTERNET)
AddPermission(android.permission.ACCESS_NETWORK_STATE)

AddApplicationText(
    <service android:name="com.uxcam.service.HttpPostService">
    </service>
    )

And the error is:

B4A Versión: 11.00
Parseando código. (0.02s)
Java Versión: 11
Building folders structure. (0.04s)
Compilando código. (0.04s)
Compilado códigos de diseños. (0.01s)
Organizando librerías. (0.36s)
(AndroidX SDK)
Compilando los recursos (0.10s)
Enlazando los recursos (0.47s)
Compilando el código del motor de depuración. (0.00s)
Compilando el código Java generado. (0.10s)
Convirtiendo byte code a dex optimizado. Error
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)

4 errors; aborting

I have tried to desugar the .jar but the error continues.

Can anyone help me?

Thanks!
 

Attachments

  • docs_UXCam.JPG
    docs_UXCam.JPG
    75.4 KB · Views: 262
Top