Appcompat活动与Android Studio中的AndroidX Gradle版本问题。

huangapple go评论62阅读模式
英文:

Appcompat activity along with androidx gradle version issue in android studio

问题

Appcompat版本用于应用程序是v7,与gradle.properties集成使用androidx以进行firebase连接
请帮忙

英文:

Appcompat活动与Android Studio中的AndroidX Gradle版本问题。

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

答案1

得分: 0

你正在使用错误的build.gradle文件

你需要将顶层文件中的implementation部分移动到app/build.gradle文件中的dependencies块中(而不是buildscript块中的dependencies):

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
    //...
}

dependencies {
    //...
    implementation 'androidx.xxxxx'
}
英文:

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'
   }

huangapple
  • 本文由 发表于 2020年10月1日 02:55:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/64144056.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定