Gradle库有不同的版本

时间:2018-04-10 07:49:11

标签: java android android-studio gradle android-gradle

昨晚,我用我的Android代码做了两件事,现在它已经不再有用了。

我做的两件事是:

  • 使用相应的gradle实现添加我的第一个adview
  • 将Android Studio更新到最新版本(3.1.1)

现在,由于库版本中的版本混合,应用无法构建。我的gradle告诉我在线上

implementation 'com.android.support:appcompat-v7:27.1.1'

implementation 'com.google.firebase:firebase-core:12.0.1'

我不知道如何解决这个问题,我搜索的任何内容都没有给我答案。有没有办法为我的应用程序自动生成所需的gradle,或者有人可以指出我在修复此问题时的方向开始吗?

先谢谢,我的gradle依赖项如下。

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

    implementation 'com.google.firebase:firebase-core:12.0.1'
    implementation 'com.google.firebase:firebase-database:12.0.1'
    implementation 'com.firebaseui:firebase-ui-auth:3.2.2'
    implementation 'com.google.firebase:firebase-auth:12.0.1'
    implementation 'com.google.android.gms:play-services-ads:12.0.1'
}

1 个答案:

答案 0 :(得分:0)

试试这个,

"com.android.support:support-v13:27.1.1"

参考链接

https://developer.android.com/topic/libraries/support-library/packages.html#v14-preference

相关问题