Search code examples
javaandroid-studiogradleandroid-appcompatandroidx

Appcompat activity along with androidx gradle version issue in android studio


Android studio error

Appcompat version used in app is v7, androidx is used for integration with gradle.properties for firebase connection Please help


Solution

  • You are using the wrong build.gradle file

    You have to move the implementation from the top-level file to the app/build.gradle file in the dependencies block (not the dependencies in the buildscript block)::

       apply plugin: 'com.android.application'
       apply plugin: 'kotlin-android'
    
       android {
        //...
       }
    
       dependencies {
            //...
            implementation 'androidx.xxxxx'
       }