question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react-native link duplicates lines in Android project

See original GitHub issue

When running react-native link, some lines are duplicated in the Android project

modified:   android/app/build.gradle
modified:   android/app/src/main/java/fr/coopcycle/MainApplication.java
modified:   android/settings.gradle
$ git diff android/app/build.gradle
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 3ff21d3..df94611 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -152,6 +152,10 @@ android {
 }

 dependencies {
+    compile project(':tipsi-stripe')
+    compile project(':react-native-maps')
+    compile project(':react-native-locale-detector')
+    compile project(':react-native-keep-awake')
     compile project(':react-native-locale-detector')
     compile(project(':react-native-keep-awake')){
       exclude group: 'com.google.android.gms'

I think it is due to the Gradle plugin, React Native 0.54 has just been released, will give it a try.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Atalacommented, Mar 4, 2018

I think I know where it comes from, let me have a look.

0reactions
Atalacommented, Apr 5, 2018

gr8

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native : Error: Duplicate resources - Android
In my case, the build failed because there are duplicated resources in my Android project (in Android folder), these two lines are necessary ......
Read more >
"Duplicate content roots detected" with Android Gradle plugin ...
As written in the title, after updating Android Gradle plugin to version 7.2.0, the IDE starts to complain about duplicated content roots.
Read more >
StyleSheet - React Native
This method internally uses StyleSheetRegistry.getStyleByID(style) to resolve style objects represented by IDs. Thus, an array of style objects ...
Read more >
React Native: Upgrade Dos and Don'ts | Shockoe
If we link a native module more than once, the project won't build. Fixing this requires manually editing the native files to remove...
Read more >
Addressing common errors in React Native - LogRocket Blog
Go into {your-project-folder}/android/app/src/main/ folder and check if an assets folder exists within it. If the assets folder isn't already ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found