ОШИБКА: невозможно разрешить зависимость для ':app@debug/compileClasspath': не удалось разрешить проект: java - PullRequest
0 голосов
/ 09 апреля 2020

Как добавить зависимость модуля в android studio?

Структура проекта enter image description here

enter image description here

enter image description here

Когда я добавляю зависимости модулей, модуль не добавляется?

enter image description here

Моя android версия студии: 3.6.1

enter image description here

enter image description here

build.gradle файл

 apply plugin: 'com.android.application'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.3"

 defaultConfig {
    applicationId "com.example.thu"
    minSdkVersion 14
    targetSdkVersion 29
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

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

}

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

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation project(path: ':java')  //i edited here try this


}

ошибка:

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could 
not resolve project :java.
Show Details
Affected Modules: app

Как я могу решить эту проблему?

1 Ответ

0 голосов
/ 09 апреля 2020

Я думаю, что вы не добавили модуль. Сначала вы должны добавить следующим образом: image . после добавления модуля вы можете добавить свою зависимость

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...