'Android Studio Bumblebee can't detect androidx package

I was using components from androidx package in a project. After upgrading my Android Studio from Arctic Fox to Bumblebee, the androidx components are not detected in the IDE. It suggests me to import them, but when I import them following the suggestion in IDE, it imports the same components from android package.

package imports As you can see in the screenshot, androidx components are greyed out but they are being used in this class.

component in usage And if I don't import from android package, the components are shown as error.

However, the project still compiles and runs without any problem. But the incorrect errors are annoying to work with.

I've tried setting the following in gradle.properties:

android.useAndroidX=true

android.enableJetifier=false

It doesn't solve the problem. Is there anything else that I can do to use my androidx components in Bumblebee? Thanks in advance :)



Solution 1:[1]

Upgrade gradle plugin to version 7.3.1

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Santhoshkumar Vellingiri