Using the answer from here Update compileSdkVersion and targetSdkVersion to 31
And add this code snippet in your android/build.gradle file at the very end.
configurations.all {
resolutionStrategy {
force 'androidx.core:core-ktx:1.6.0'
}
}
Just recently the original author of audioplayers package fixed this issue in his recent PR. It has been fixed in audioplayers version 0.20.1, so if your issue is related to audioplayers, do upgrade.