Hi all:
I have a small app to open the garage door.
It's made with B4XPages and it was working.
Now I want to make some changes, and I get the error you can see in the logs.
I've searched the forum and I've seen it's related with "desugar" some libraries.
I think all the libraries I have in my project are "standard" libraries, except maybe jMQTT
I've tried to "desugar" it adapting the command in this thread, but I don't know how to adapt the "gson-2.3.1.jar" part.
Thanks.
I have a small app to open the garage door.
It's made with B4XPages and it was working.
Now I want to make some changes, and I get the error you can see in the logs.
B4X:
B4A Versión: 10.70
Parseando código. (0.33s)
Java Versión: 8
Building folders structure. (0.17s)
Compilando código. (0.70s)
Compilado códigos de diseños. (0.01s)
Organizando librerías. (0.00s)
(AndroidX SDK)
Compilando los recursos (0.24s)
Enlazando los recursos (0.98s)
Compilando el código del motor de depuración. (0.04s)
Compilando el código Java generado. (0.08s)
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)
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)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:692)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:315)
at com.android.dx.command.dexer.Main.runDx(Main.java:293)
at com.android.dx.command.dexer.Main.main(Main.java:249)
at com.android.dx.command.Main.main(Main.java:94)
Caused by: java.lang.InterruptedException: Too many errors
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:684)
... 4 more
I've searched the forum and I've seen it's related with "desugar" some libraries.
I think all the libraries I have in my project are "standard" libraries, except maybe jMQTT
I've tried to "desugar" it adapting the command in this thread, but I don't know how to adapt the "gson-2.3.1.jar" part.
B4X:
"c:\java\jdk1.8.0_291\bin\java" -jar Desugar_deploy.jar --bootclasspath_entry="C:\android\platforms\android-30\android.jar" --input="c:\JJ\jMQTT.jar --output=jMQTT.jar --bootclasspath_entry="C:\Users\H\Documents\AdditionalLibs\B4A\gson-2.3.1.jar"
Thanks.