Async-storage: Android - Gradle Sync Issue - Duplicate module in IML file

Created on 19 Feb 2020  路  6Comments  路  Source: react-native-async-storage/async-storage

You want to: Ask a question

Hello Guys,
While installing react-native-firebase and react-native-async-storage, I encountered the below issue.
Currently, I'm deleting each duplicate module manually; but this is not ideal.
Can you please suggest me what is the best way to fix this ?

Details:

ERROR: The modules ['async-storage-android-@react-native-community_async-storage', 'react-native-community_async-storage'] point to the same directory in the file system.
Each module must have a unique path.

All 6 comments

Hey @avinashlng1080

What RN version are you using? I suspect that the AsyncStorage might be linked two times - manually and by auto-linking feature.

Hello @Krizzu ,
I'm on "react-native": "0.61.4",.

How does your MainApplication.java and settings.gradle look like?

Same problem, anyone solved it?

It finally solved out by installing the latest android studio, updating the gradle build plugin to 3.6.0.

Optionally, I also ran npx react-native link packageName and remove the imported package from the mainapplication.java file only while leaving the path inside the setting.grDle file.

It finally solved out by installing the latest android studio, updating the gradle build plugin to 3.6.0.

Thank you, updating Android Studio and gradle to 3.6.1 were fixed my problem

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jordangrant picture jordangrant  路  6Comments

MwareSolutons picture MwareSolutons  路  7Comments

msqar picture msqar  路  7Comments

Krizzu picture Krizzu  路  3Comments

timmywil picture timmywil  路  6Comments