Android Question Error adding #AdditionalJar: com.google.firebase:firebase-crashlytics to project

Ederson Kerber

Member
Licensed User
Hi,

When I add this
Code: Copy
#AdditionalJar: com.google.firebase:firebase-crashlytics
in "Project Attributes" I get the following error when compiling:

B4A Version: 10.70
Parsing code. (0.05s)
Java Version: 11
Building folders structure. (0.03s)
Compiling code. (0.11s)

ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. (0.01s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Compiling resources (0.36s)
Linking resources (1.45s)
Compiling generated Java code. (4.54s)
Convert byte code - optimized dex. Error
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
1 error; aborting

I've reinstalled Android SDK + Required Resources, but it didn't resolve the error. All recommended items in the B4A SDK Manager are installed.


Libraries.PNG


Paths.PNG



SDK_Manager.PNG


Manifest.PNG


Thanks for any help!
 
I've already changed the minSdkVersion in the manifest to 28, but the error remains. If I delete the line below the project compiles normally. The problem is on the line below:

Code: Copy
#AdditionalJar: com.google.firebase:firebase-crashlytics
 
Last edited:
Upvote 0
Code: Copy
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="29"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
AddReplacement($ADMOB_APP_ID$, ca-app-pub-****************~*********)
'End of default text.

SetApplicationAttribute(android:theme, "@style/MyAppTheme")

CreateResource(values, theme.xml,
<resources>
    <style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">#0098FF</item>
        <item name="colorPrimaryDark">#007CF5</item>
        <item name="colorAccent">#AAAA00</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
        <item name="android:windowTranslucentNavigation">false</item>
         <item name="android:windowTranslucentStatus">true</item>
    </style>
</resources>
)

CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)
CreateResourceFromFile(Macro, FirebaseAnalytics.Crashlytics)
 
Upvote 0
I've already changed minSdkVersion="28" and tried to compile, but the problem remains. So I went back to the initial parameter: minSdkVersion = "14"
 
Upvote 0
Here is a simple project reproducing the error at compile time.

Download Project Example

P.S: I put the project on Wetransfer, because when I tried to attach the .zip file here I got the following message: "The uploaded file is too large." (The Archive is 911kb).

Thanks!
 
Upvote 0
Back
Top