0

I followed all the tutorials in stackoverflow about this.

I have an android app in project/android, and a second project in project/api. What can I do in project/android to add project/api as a dependency?

I followed Android studio add external project to build.gradle by doing

include ':VenkoAPI' project(':VenkoAPI').projectDir = new File(settingsDir, '../../api') 

in settings.gradle

and then

dependencies { compile project(':VenkoAPI') 

in build.gradle. I'm getting

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :VenkoAPI. ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve project :VenkoAPI. ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve project :VenkoAPI. 

What do these errors mean?

1 Answer 1

1

Change your settings.gradle as

include ':Project', ':API_PROJECT_NAME' 

And in your build.gradle:

implementation project(path: ':API_PROJECT_NAME') 

This works for me.

Sign up to request clarification or add additional context in comments.

1 Comment

Are both the projects inside the same main folder?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.