Gradle Tutorial : Part 8 : Gradle + App Engine + Endpoints + Android Studio
Romin Irani

You just saved me a few hours of my life. I don't know why, but Android Studio has some issues with adding modules. I was having a DuplicatedFile exception due this:

compile project(path: ':backend', configuration: 'android-endpoints')
compile(path: ':backend')

Without the second compile, I was unable to access the backend api. With the second compile, the exception appears. After reading this:

Tip: Keep in mind that anytime you make any changes to your build files, do remember to click on the Sync Project with Gradle Files as shown below. It should launch the build and you should be able to see the Gradle commands getting executed in the Gradle Console

My problem was solved! No more two compiles for same module in gradle.

I never had to push this button, it wasn't necessary until now.

Thanks for this post. Very useful!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.