【问题标题】:dependency issue in android 3.1.3android 3.1.3 中的依赖问题
【发布时间】:2018-09-06 22:21:18
【问题描述】:
 dependencies {

 implementation fileTree(include: ['*.jar'], dir: 'libs')

 implementation 'com.android.support:appcompat-v7:28.0.0-rc01'

 implementation 'com.android.support.constraint:constraint-layout:1.1.2'

 testImplementation 'junit:junit:4.12'

 androidTestImplementation 'com.android.support.test:runner:1.0.2'

 androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

 implementation 'com.android.support:recyclerview-v7:28.0.0-rc01'

implementation 'com.android.support:design:28.0.0-rc01'been 
}

对于appcompat-v7:28.0.0-rc01Android studio 3.1.3 的依赖关系,我有错误,甚至对于 com.android.support.constraint:constraint-layout:1.1.2 和 1.1.3 布局的 rc02 也是如此。我该如何解决?

dependency issues

build description app file for build

【问题讨论】:

  • 能否添加错误截图?
  • 发布完整的 Gradle。
  • 发布你的错误
  • 您是否将编译SDK版本更改为28?请张贴您的错误日志。将来,请始终在问题中发布您的错误,这将有助于更快地解决您的问题。

标签: android android-studio dependencies


【解决方案1】:

尝试像这样使用较低版本的 appcompat:

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

还要记得将 sdkVersion 更改为 27

【讨论】:

  • 我已经这样做了,我仍然得到错误,即使我已经将 sdpcompile 版本和目标版本更改为 27 仍然我得到错误
【解决方案2】:

我有这些依赖项,因此您可以根据需要使用任何依赖项,并确保在 Settings->Gradle 中关闭 Offline Work 以使其正常工作。

当我遇到这些错误时,我正在通过禁用 Settings->Gradle 中的 Offline Work 来搜索这些错误,您可以在没有任何错误的情况下使其同步。

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:design:28.0.0-rc01'
testImplementation 'junit:junit:4.12'
// google play services
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

问候

【讨论】:

    猜你喜欢
    • 2017-12-26
    • 2014-08-09
    • 1970-01-01
    • 2018-04-14
    • 1970-01-01
    • 2011-07-23
    • 2019-03-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多