Home > Enterprise >  Android Studio Dependency 'androidx.browser:browser:1.4.0' requires 'compileSdkVersio
Android Studio Dependency 'androidx.browser:browser:1.4.0' requires 'compileSdkVersio

Time:07-02

currently my sdk version is 29. I've added firebase imports in gradle and it works fine for the database and firestore. But when I add the import for the firebase auth I get this error.

One or more issues found when checking AAR metadata values:

Dependency 'androidx.browser:browser:1.4.0' requires 'compileSdkVersion' to be set to 31 or higher. Compilation target for module ':app' is 'android-29'

I've tried importing with no version (in firebase documentation firebase bom select the version automatic and I've tried setting the version to implementation 'com.google.firebase:firebase-auth:21.0.6' but I get the same error)

Here is a piece of my gradle file:

    implementation platform('com.google.firebase:firebase-bom:30.1.0')
implementation 'com.google.firebase:firebase-analytics'

implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.firebase:firebase-firestore'
implementation 'com.google.firebase:firebase-auth'

The problem is the firebase-auth because if I comment the line of code the app runs fine

CodePudding user response:

Fixed by setting the implementation of firebase bom to the version of 29:

implementation platform('com.google.firebase:firebase-bom:29.3.1')

  • Related