square / assertj-android

A set of AssertJ helpers geared toward testing Android.
https://square.github.io/assertj-android/
Apache License 2.0
1.58k stars 156 forks source link

Android Studio: Each module has to have a unique path #174

Closed sberan closed 9 years ago

sberan commented 9 years ago

After pulling the git repository and opening in Android Studio, I get the following error when trying to sync the project with Gradle:

Error:The modules 'assertj-android', 'assertj-android-root' point to same directory in the file system.
Each module has to have a unique path.

These modules are in different directories, so I'm pretty confused as to why AS would think they are in the same path.

JakeWharton commented 9 years ago

This usually is the result of old iml files. Delete them all and reimport.

On Thu, Sep 17, 2015, 10:44 AM Sam Beran notifications@github.com wrote:

After pulling the git repository and opening in Android Studio, I get the following error when trying to sync the project with Gradle:

[image: Error:The modules 'assertj-android', 'assertj-android-root' point to same directory in the file system.
Each module has to have a unique path.] https://cloud.githubusercontent.com/assets/100066/9936240/93f4066c-5d20-11e5-9d78-47ba2ef26f64.png

These modules are in different directories, so I'm pretty confused as to why AS would think they are in the same path.

— Reply to this email directly or view it on GitHub https://github.com/square/assertj-android/issues/174.

JakeWharton commented 9 years ago

Did that work?

On Thu, Sep 17, 2015, 10:53 AM Jake Wharton jakewharton@gmail.com wrote:

This usually is the result of old iml files. Delete them all and reimport.

On Thu, Sep 17, 2015, 10:44 AM Sam Beran notifications@github.com wrote:

After pulling the git repository and opening in Android Studio, I get the following error when trying to sync the project with Gradle:

[image: Error:The modules 'assertj-android', 'assertj-android-root' point to same directory in the file system.
Each module has to have a unique path.] https://cloud.githubusercontent.com/assets/100066/9936240/93f4066c-5d20-11e5-9d78-47ba2ef26f64.png

These modules are in different directories, so I'm pretty confused as to why AS would think they are in the same path.

— Reply to this email directly or view it on GitHub https://github.com/square/assertj-android/issues/174.

sberan commented 9 years ago

sorry - my e-mail notification got buried, trying now.

I wouldn't expect it to work, since it's a freshly cloned project, but I'll try it!

On Thu, Sep 17, 2015 at 1:05 PM, Jake Wharton notifications@github.com wrote:

Did that work?

On Thu, Sep 17, 2015, 10:53 AM Jake Wharton jakewharton@gmail.com wrote:

This usually is the result of old iml files. Delete them all and reimport.

On Thu, Sep 17, 2015, 10:44 AM Sam Beran notifications@github.com wrote:

After pulling the git repository and opening in Android Studio, I get the following error when trying to sync the project with Gradle:

[image: Error:The modules 'assertj-android', 'assertj-android-root' point to same directory in the file system.
Each module has to have a unique path.] < https://cloud.githubusercontent.com/assets/100066/9936240/93f4066c-5d20-11e5-9d78-47ba2ef26f64.png

These modules are in different directories, so I'm pretty confused as to why AS would think they are in the same path.

— Reply to this email directly or view it on GitHub https://github.com/square/assertj-android/issues/174.

— Reply to this email directly or view it on GitHub https://github.com/square/assertj-android/issues/174#issuecomment-141168731 .

sberan commented 9 years ago

Weird, removing the .iml and reimporting worked.

ZhaoKaiQiang commented 8 years ago

it's work for me ,3ks

joelcatorpedrojr11 commented 8 years ago

step by step please

JulianKingman commented 7 years ago

instructions here: http://stackoverflow.com/a/27532990/1198813

zhipengyue commented 7 years ago

thank u,very helpful.

Senhordim commented 7 years ago

thank man!

RahulQorql commented 7 years ago

Deleting IML files and Re-Import fixed the issue.

chuwe1 commented 6 years ago

That works, good.

mima5 commented 6 years ago

Where i find the IML files?

karimkod commented 6 years ago

@mima5 You can find the iml files on the root directory of your project (if you are working on git, is where you find .git hidden directory)

chuwe1 commented 6 years ago

@mima5 IML file means a files its suffix is .iml

mima5 commented 6 years ago

thanks man!

ArashYounesi commented 4 years ago

I Updated my android studio and it solved (Now i have android studio V4.0) None of the above answers helped me