【问题标题】:Android: Unresolved DependenciesAndroid:未解决的依赖关系
【发布时间】:2019-10-12 13:53:34
【问题描述】:

我是使用 android studio 的新手,基本上我的依赖项有问题我不确定发生了什么,但我尝试将我的 gradle 插件版本更新到 3.5.1 并将 gradle 版本更新到 5.4。 1,还是什么都没发生。我也尝试过更新我的 SDK,但它仍然给我同样的错误。

错误:

ERROR: Unable to resolve dependency for ':robotutility@debug/compileClasspath': Could not resolve project :nerarosbridgeclient.

这是我的 Build.Gradle 项目:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
    google()
    jcenter()

 }
  dependencies {
    classpath 'com.android.tools.build:gradle:3.5.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
  }

     allprojects {
        repositories {
          google()
          jcenter()

    }
  }

   task clean(type: Delete) {
   delete rootProject.buildDir
}

& 构建 Gradle 模块:

apply plugin: 'com.android.application'

    android {
    compileSdkVersion 28
    buildToolsVersion "29.0.1"
    defaultConfig {
    applicationId 'com.nerarobotics.robotutility'
    minSdkVersion 16
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
       }
    }
 }

 dependencies {
//noinspection DuplicatePlatformClasses
implementation fileTree(include: ['*.jar'], dir: 'libs')

//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:23.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
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.jaredrummler:material-spinner:1.3.1'
implementation 'com.google.code.gson:gson:2.8.6'
implementation project(path: ':nerarosbridgeclient')

}

Settings.gradle

include ':robotutility', ':nerarosbridgeclient'

提前致谢!

【问题讨论】:

  • 请发布您的 settings.gradle
  • 您的工作区中是否有 nerarosbridgeclient 项目可用?
  • 如果nerarosbridgeclient 项目在您的工作区中可用,那么您必须将其包含在settings.gradle 中。

标签: java android dependencies


【解决方案1】:

可能项目 nerarosbridgeclient 未包含在您的 settings.gradle 中,或者您的工作区中缺少项目。请检查并更新。

如果缺少此行,请在settings.gradle 中添加:

include ':nerarosbridgeclient'

【讨论】:

    猜你喜欢
    • 2016-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-27
    • 1970-01-01
    相关资源
    最近更新 更多