I recently migrated my Android app from the traditional Android Support Library to AndroidX to stay updated with the latest libraries and features. However, I’ve encountered a significant drop in app performance, especially with RecyclerView becoming noticeably slower.
Here is the snippet of the dependencies before and after the migration:
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
compile('com.android.support:design:26.1.0') {
transitive = true
exclude module: 'recyclerview-v7'
}
// Use older recyclerview version due to issue:
https://issuetracker.google.com/issues/38375597
// Don't upgrade until that issue is resolved! otherwise we'll have users crashing
implementation 'com.android.support:recyclerview-v7:24.2.1'
After migration (AndroidX):
// External dependencies
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.preference:preference:1.1.1'
compile('com.google.android.material:material:1.0.0') {
transitive = true
exclude module: 'recyclerview-v7'
}
// Use older recyclerview version due to issue: https://issuetracker.google.com/issues/38375597
// Don't upgrade until that issue is resolved! otherwise we'll have users crashing
implementation 'androidx.recyclerview:recyclerview:1.0.0'
Has anyone else experienced similar issues after migrating to AndroidX, especially concerning RecyclerView performance? Are there any specific steps or configurations I might be missing during the migration that could impact performance?
I appreciate any insights or suggestions on how to address this performance drop