0

How can I add module dependency in android studio?

Project Structure enter image description here

enter image description here

enter image description here

When I add module dependencies there is no module to add?

enter image description here

My android studio version : 3.6.1

enter image description here

enter image description here

build.gradle file

 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:

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

How can I solve this?

Mohammad
  • 11
  • 6
Pradeep Simba
  • 282
  • 5
  • 15

1 Answers1

0

I think you didn't add the Module .first you should add with this way : enter image description here after adding module you can add your dependency

sanoj lawrence
  • 951
  • 5
  • 29
  • 69
Mohammad
  • 11
  • 6