Android Question After update Android SDK ,show up "Maven artifact not found: androidx.collection/collection"

tzfpg

Active Member
Licensed User
Longtime User
This morning i update Android SDK , and then B4A show up message bellow:
B4X:
B4A Version: 9.01
Java Version: 8
Parsing code.    (0.14s)
Building folders structure.    (0.05s)
Running custom action.    (1.03s)
Compiling code.    (0.23s)
Compiling layouts code.    (0.03s)
Organizing libraries.    Error
Maven artifact not found: androidx.collection/collection

* I already try to delete old sdk, and install new sdk but problem same.
 

tzfpg

Active Member
Licensed User
Longtime User
i already install all related to androidx.*
B4X:
androidx.annotation/annotation
androidx.core/core
androidx.lifecycle/lifecycle-runtime
androidx.lifecycle/lifecycle-common
androidx.arch.core/core-common
androidx.versionedparcelable/versionedparcelable
androidx.fragment/fragment
androidx.legacy/legacy-support-core-ui
androidx.legacy/legacy-support-core-utils
androidx.documentfile/documentfile
androidx.loader/loader
androidx.lifecycle/lifecycle-livedata
androidx.lifecycle/lifecycle-livedata-core
androidx.arch.core/core-runtime
androidx.lifecycle/lifecycle-viewmodel
androidx.localbroadcastmanager/localbroadcastmanager
androidx.print/print
androidx.customview/customview
androidx.viewpager/viewpager
androidx.coordinatorlayout/coordinatorlayout
androidx.slidingpanelayout/slidingpanelayout
androidx.interpolator/interpolator
androidx.swiperefreshlayout/swiperefreshlayout
androidx.asynclayoutinflater/asynclayoutinflater
....more

after install all, i facing another problems
B4X:
B4A Version: 9.01
Java Version: 8
Parsing code.    (0.14s)
Building folders structure.    (0.06s)
Running custom action.    (1.05s)
Compiling code.    (0.23s)
Compiling layouts code.    (0.03s)
Organizing libraries.    (0.90s)
Generating R file.    Error
d:\android\tools\..\extras\b4a_remote\com\android\support\coordinatorlayout\28.0.0\unpacked-coordinatorlayout-28.0.0\res\values\values.xml:28: error: Attribute "layout_anchorGravity" already defined with incompatible format.
d:\android\tools\..\extras\b4a_remote\androidx\coordinatorlayout\coordinatorlayout\1.0.0\unpacked-coordinatorlayout-1.0.0\res\values\values.xml:30: Original attribute defined here.
d:\android\tools\..\extras\b4a_remote\com\android\support\coordinatorlayout\28.0.0\unpacked-coordinatorlayout-28.0.0\res\values\values.xml:67: error: Attribute "layout_insetEdge" already defined with incompatible format.
d:\android\tools\..\extras\b4a_remote\androidx\coordinatorlayout\coordinatorlayout\1.0.0\unpacked-coordinatorlayout-1.0.0\res\values\values.xml:67: Original attribute defined here.
d:\android\tools\..\extras\b4a_remote\com\android\support\coordinatorlayout\28.0.0\unpacked-coordinatorlayout-28.0.0\res\values\values.xml:84: error: Attribute "layout_dodgeInsetEdges" already defined with incompatible format.
d:\android\tools\..\extras\b4a_remote\androidx\coordinatorlayout\coordinatorlayout\1.0.0\unpacked-coordinatorlayout-1.0.0\res\values\values.xml:86: Original attribute defined here.
d:\android\tools\..\extras\b4a_remote\com\android\support\support-compat\28.0.0\unpacked-support-compat-28.0.0\res\values\values.xml:36: error: Attribute "fontProviderFetchStrategy" already defined with incompatible format.
d:\android\tools\..\extras\b4a_remote\androidx\core\core\1.0.2\unpacked-core-1.0.2\res\values\values.xml:42: Original attribute defined here.
d:\android\tools\..\extras\b4a_remote\com\android\support\support-compat\28.0.0\unpacked-support-compat-28.0.0\res\values\values.xml:51: error: Attribute "fontProviderFetchTimeout" already defined with incompatible format.
d:\android\tools\..\extras\b4a_remote\androidx\core\core\1.0.2\unpacked-core-1.0.2\res\values\values.xml:54: Original attribute defined here.
d:\android\tools\..\extras\b4a_remote\com\android\support\support-compat\28.0.0\unpacked-support-compat-28.0.0\res\values\values.xml:61: error: Attribute "fontStyle" already defined with incompatible format.
d:\android\tools\..\extras\b4a_remote\androidx\core\core\1.0.2\unpacked-core-1.0.2\res\values\values.xml:62: Original attribute defined here.

*update - when i use Firebase and AppCompat lib will get these error.

*update - when i remove all related to firebase code and lib, app run normal and no more error message.

how to solve these problem, my project need to use these lib?
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
why you are adding androidx artifacts?
Where does the requirement for them comes from?
 
Upvote 0

tzfpg

Active Member
Licensed User
Longtime User
i didn't adding androidx artifacts, i just update android sdk, then become like this.

i think here
B4X:
#Extends: android.support.v7.app.AppCompatActivity
#AdditionalJar: com.android.support:support-compat
#AdditionalJar: com.google.android.gms:play-services-vision
#AdditionalJar: com.crashlytics.sdk.android:crashlytics
#AdditionalJar: com.google.firebase:firebase-core
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
The latest version of Firebase is based on androidx libraries (https://firebase.google.com/support/release-notes/android#update_-_june_17_2019).
These libraries are not yet supported by B4A.

If you have already updated the SDK then you will need to download the "ready to run" sdk and use that one instead: https://www.b4x.com/android/forum/threads/ready-to-run-sdk.99780/#content
I've removed Firebase libraries from the list of recommended items so they won't appear in the recommended list.

The next version of B4A will add support for these libraries.
 
Upvote 0
Top