Android Question [SOLVED] already added: Lcom/google/firebase/encoders/

DonManfred

Expert
Licensed User
Longtime User
I´m trying to compile a project using a fresh newlyinstalled sdk as per Instructions.
When opening the project i get an Error

I then ran the SDKManager and install the missing Artifact. I also installed all recommended (and preselected) Items.

SDKManager has the Version 3.71
BTW: The SDKManager inside the B4A 10.2 Setup contains Version 3.70

After the SDKManager has done its Job i refreshed the Librarytab in the IDE with my Project opened.

An Errormessage pops up:
"An Error occured.
Maven Artifact not found: com.google.firebase/firebase-encoders

I then installed the firebase-encoders (V16.0.0) with the SDKManager and refreshed the Librarylist

An Errormessage pops up:
"An Error occured.
Maven Artifact not found: androidx.viewpager2/viewpager2

I then installed the androidx.viewpager2.viewpager2 (V1.0.0) with the SDKManager and refreshed the Librarylist

Now no more Errors appear when refreshing.

I now clean my project and do a recompile:



Libraries i am using:


Manifest:
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="19" 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$")
'CreateResourceFromFile(Macro, Themes.DarkTheme)
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(values, theme.xml,
<resources>
    <style name="MyAppTheme" parent="@style/Theme.AppCompat">
        <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:windowDrawsSystemBarBackgrounds">false</item>
        <item name="android:statusBarColor">@android:color/transparent</item>
    </style>
</resources>
)

'End of default text.
' ### FIREBASE
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
CreateResourceFromFile(Macro, FirebaseAnalytics.Crashlytics)
'CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)


AddPermission(android.permission.WRITE_EXTERNAL_STORAGE) ' Allows an application to write to external storage.
AddPermission(android.permission.READ_PHONE_STATE) ' Allows read only access to phone state.
AddPermission(android.permission.CAMERA) ' Required to be able to access the camera device.
AddPermission(android.permission.RECORD_AUDIO) ' Allows an application to record audio.

' ### FILE PROVIDER
AddApplicationText(
  <provider
  android:name="android.support.v4.content.FileProvider"
  android:authorities="$PACKAGE$.provider"
  android:exported="false"
  android:grantUriPermissions="true">
  <meta-data
  android:name="android.support.FILE_PROVIDER_PATHS"
  android:resource="@xml/provider_paths"/>
  </provider>
)
CreateResource(xml, provider_paths,
   <files-path name="name" path="shared" />
)

AddReceiverText(AutoStartApp, <intent-filter>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
</intent-filter>)

CreateResourceFromFile(Macro, Core.NetworkClearText)

As i do use Crashlytics in main i do have
B4X:
#Extends: androidx.appcompat.app.AppCompatActivity
#AdditionalJar: com.google.firebase:firebase-crashlytics

Any Hint to fix the PRoblem would be appreciated.
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…