Android Question [SOLVED] FirebaseFirestore error com.android.dx.cf.code.SimException

musaso

Member
Licensed User
Instal proyect from
https://www.b4x.com/android/forum/t...ectionreference-is-not-inited.106079/#content
I have the following error: Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)

B4X:
B4A Versión: 9.30
Java Versión: 8
Parseando código.    (0.00s)
Building folders structure.    (0.12s)
Compilando código.    (0.07s)
Compilado códigos de diseños.    (0.00s)
Organizando librerías.    (0.13s)
    (AndroidX SDK)
Generando el fichero R.    (0.00s)
Compilando el código Java generado.    (4.53s)
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)
1 error; aborting
 

musaso

Member
Licensed User
Is this library the one that causes the error?

B4X:
'#AdditionalJar: com.google.gms:google-services
If I put a comment, the error disappears
 

musaso

Member
Licensed User
Thanks for answering Erel.
I followed the instructions and executed the program b4j changing the paths and did not find anything.
"C:\Android\platforms\android-28\android.jar" my path
I have checked the file android.jar and it does not have any classes.jar or .aar ????
Log of b4j
B4X:
extract
merge
zip error: Nothing to do! (try: zip -r C:\Program Files (x86)\Anywhere Software\B4J\Proyectos\Desugar\desugar\temp\merged.jar . -i .)
12
 

DonManfred

Expert
Licensed User
Try download
- the new example from Dropbox (same link as before)
- the addlibs.zip from Dropbox (same link as before). Extract all files from the zip to your additional library folder.

Basically with this "setup" it is working for me
B4X:
#Extends: android.support.v7.app.AppCompatActivity
#MultiDex: true
#BridgeLogger: true
#AdditionalJar: com.google.firebase:firebase-common
#AdditionalJar: com.google.firebase:firebase-auth
#AdditionalJar: com.google.firebase:firebase-database
#AdditionalJar: com.google.firebase:firebase-core
#AdditionalJar: com.google.firebase:firebase-common
#AdditionalJar: com.google.firebase:firebase-firestore
'#AdditionalJar: com.google.gms:google-services
#AdditionalJar: grpc-all-1.22.1.jar
#AdditionalJar: grpc-api-1.22.1.jar
#AdditionalJar: grpc-core-1.22.1.jar
#AdditionalJar: grpc-okhttp-1.22.1.jar
#AdditionalJar: grpc-android-1.22.1.aar
#AdditionalJar: grpc-android-1.22.1-zero.jar ' Desugared (Like Coke Zero :D)
#AdditionalJar: grpc-context-1.22.1.jar
#AdditionalJar: grpc-stub-1.22.1.jar
'#AdditionalJar: grpc-protobuf-1.22.1.jar
#AdditionalJar: grpc-protobuf-lite-1.22.1.jar

#AdditionalJar: opencensus-api-0.23.0.jar
#AdditionalJar: opencensus-contrib-grpc-metrics-0.23.0.jar
#AdditionalJar: opencensus-contrib-http-util-0.23.0.jar
#AdditionalJar: perfmark-api-0.17.0.jar
#AdditionalJar: guava-27.1-android.jar
#ExcludeClasses: com.google.guava:guava-jdk5
All needed jars should be in the addlibs.zip
 
Last edited:

musaso

Member
Licensed User
Thanks DonManfred now compiles well without error.
But I can not add documents to my database, they stay in hasPendingWrites = true and isFromCache = true
I do not know if I should open another thread thanks.
 
Top