【问题标题】:Where are the dependency Versions defined in build gradle (app) of Android Studio?Android Studio的build gradle(app)中定义的依赖版本在哪里?
【发布时间】:2019-01-30 20:10:28
【问题描述】:

我从 Universal Music Player - Google Sample 的 GitHub 导入了一个项目。 我找不到这里定义的依赖版本。

https://github.com/googlesamples/android-UniversalMusicPlayer

这是我从中导入项目的地方

依赖{ 实施项目(':media')

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

implementation "androidx.appcompat:appcompat:$androidx_app_compat_version"
implementation "androidx.legacy:legacy-support-v4:$androidx_version"
implementation "androidx.recyclerview:recyclerview:$androidx_version"

implementation "androidx.constraintlayout:constraintlayout:$constraint_layout_version"
implementation "androidx.lifecycle:lifecycle-extensions:$arch_lifecycle_version"

// Glide dependencies
implementation "com.github.bumptech.glide:glide:$glide_version"
kapt "com.github.bumptech.glide:compiler:$glide_version"

}

我期待 def 版本名称,但似乎无法弄清楚它在 Google 示例代码中的位置。

【问题讨论】:

    标签: android android-studio


    【解决方案1】:

    版本在项目根文件夹的build.gradle 中定义。

    buildscript {
        ext {
            // App SDK versions.
            compileSdkVersion = 28
            minSdkVersion = 19
            targetSdkVersion = 28
    
            // Dependency versions.
            arch_lifecycle_version = '2.0.0'
            constraint_layout_version = '1.1.3'
            exoplayer_version = '2.9.1'
            glide_version = '4.8.0'
            gms_strict_version_matcher_version = '1.0.3'
            gradle_version = '3.1.4'
            gson_version = '2.8.5'
            kotlin_version = '1.3.10'
            androidx_version = '1.0.0'
            androidx_app_compat_version = '1.0.2'
            test_runner_version = '1.1.0'
        }
    }
    

    【讨论】:

      猜你喜欢
      • 2015-08-13
      • 2018-01-12
      • 2013-08-09
      • 1970-01-01
      • 2022-06-13
      • 1970-01-01
      • 2018-05-02
      • 2021-02-10
      • 2019-07-23
      相关资源
      最近更新 更多