Error: The architecture arm64 has duplicate symbols in React-Native

I am encountering an issue in my React-Native project after installing vision-camera-code-scanner. When attempting to build the project in XCode, I am faced with the following error message:

duplicate symbol '_OBJC_CLASS_$_GDTCCTCompressionHelper' in:
    /Users/XXX/Library/Developer/Xcode/DerivedData/XXX-xxx/Build/Products/Debug-iphoneos/GoogleDataTransport.o
    /Users/XXX/Library/Developer/Xcode/DerivedData/XXX-xxx/Build/Products/Debug-iphoneos/GoogleDataTransport/libGoogleDataTransport.a(GDTCCTCompressionHelper.o)

duplicate symbol '_OBJC_METACLASS_$_GDTCCTCompressionHelper' in:
    /Users/XXX/Library/Developer/Xcode/DerivedData/XXX-xxx/Build/Products/Debug-iphoneos/GoogleDataTransport.o
    /Users/XXX/Library/Developer/Xcode/DerivedData/XXX-xxx/Build/Products/Debug-iphoneos/GoogleDataTransport/libGoogleDataTransport.a(GDTCCTCompressionHelper.o)
[...]
ld: 105 duplicate symbols for architecture arm64

Upon reviewing the log, it appears that the duplicate symbols are found in these files:

GoogleDataTransport.o
libGoogleDataTransport.a

GoogleUtilities_Environment.o
libGoogleUtilities.a

GoogleUtilities_Logger.o
libGoogleUtilities.a

GoogleUtilities_UserDefaults.o
libGoogleUtilities.a

FBLPromises.o
libPromisesObjC.a

I have attempted to identify and remove duplicate files without success: https://i.sstatic.net/Iw74E.png

Being new to React-Native, I am seeking guidance on resolving this duplicate symbols error. Any suggestions would be greatly appreciated.

Answer №1

There could be several reasons for the issue at hand.

  • It is possible that you have accidentally linked the file twice, resulting in a duplicate entry in the specified path.

Alternatively,

  • You might be attempting to link two different files with identical names.

The error message provided is quite general, so it could also be due to other factors. I recommend checking the specified path for any files with matching names and extensions, or verifying if the file is linked twice in the Compile resources section.

To access the Compile resources path, visit:

Answer №2

Follow these instructions

  1. Execute
    rm -rf ~/Library/Developer/Xcode/DerivedData/*
    to eliminate DerivedData
  2. Erase the ios/pods directory
  3. Delete the ios/build directory
  4. Get rid of Podfile.lock
  5. If necessary, remove the DEAD_CODE_STRIPPING option from
    ios/app.xcodeproj/project.pbxproj
  6. Run pod install and attempt a rebuild

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

An alternative to utilizing React Hook Form's useWatch feature

In my React app, I am utilizing React Hook Form where I am using an older version (v5) that does not include the useWatch function. As a workaround, I am currently employing watch() to monitor my input fields and update the global state whenever there is ...

Avoid refreshing the page when clicking on an anchor tag in Vue.js

I have the code below in my Vue file. The problem I am encountering is that the page reloads whenever I click on the link. I have tried using event.preventDefault() but it did not solve the issue. Can someone please help me identify what I am doing wrong ...

What is the reason why Discord.js is not utilizing the message object?

My goal was to send a series of buttons ahead of time for collection, but I encountered an issue when running the collector. The error message displayed: const collector = message.createMessageComponentCollector({ componentType: ComponentType.Button, ...

When trying to use selenium.WebDriver, an error pops up: "missing ) after argument list."

Trying to extract content from the ::after element is proving to be a challenge. Despite my attempts, I keep encountering an exception: "OpenQA.Selenium.WebDriverException: "javascript error: missing ) after argument list My setup includes VSC, Selenium ...

Unlock the Power of jQuery Plugins: Implementing Global Settings Modifications

I have developed a jQuery plugin ( https://github.com/OscarGodson/jKey ) and some users are requesting localization support. My initial idea was to add an additional parameter in the plugin for localization, such as: $(window).jkey('?',callback, ...

The second parameter within the ReactJS function is not defined

Exploring the world of ReactJS through a small project has been an enjoyable experience for me so far. I encountered a few challenges along the way, but this community has been helpful in resolving them. Currently, my focus is on modifying the links in th ...

Determining height of an element in AngularJS directive prior to rendering the view

As I dive into the world of Angular, any assistance is greatly welcomed. My goal is to vertically align a div based on screen size (excluding the header and footer) when the page loads, the window resizes, and during a custom event triggered by the user ex ...

What is the process for creating a clickable file upload in Angular?

Currently, I am utilizing the instructions found in this guide to implement a file upload feature in my project. The code provided works perfectly: <input type="file" class="file-input (change)="onFileSelected($event)" #fileUplo ...

Using a .get() request to perform a nested fetch operation and return the fetched

I'm having trouble making this fetch request work inside the .get() request. It works fine on its own, as the console.log that shows 'first player' displays the data I need. However, when I try to call this function inside the router.get(), ...

Obtain the contenteditable span's value

I'm facing an issue with a content editable span - I want to extract its value when the post button is clicked, but it's not working as expected. Please note that I am unable to convert the span to a textbox or div, I specifically need the value ...

Upon the completion of the Vue component, all subsequent elements are automatically removed

If you take a look at this website along with its source code, you'll notice an issue. Removing the cdn for the vue-tag-input component causes everything to render except the component itself. However, adding the cdn back results in nothing being disp ...

Dealing with a situation where different functions need to be called based on a condition while using unique button names. This is

<button type="button" class="btn btn-primary ms-4" (click)="update()">Save</button> <button type="button" class="btn btn-primary ms-4" (click)="create()">Add</button> B ...

Steps to forward a restricted user to a specific webpage

I am currently utilizing NextJs and am in the process of creating a redirecting function for users who have been banned or blocked from accessing the DB/session. My attempt at this involved: redirect.js, where I created a custom redirect function. impo ...

Categorize messages based on the date they were last read in Angular

I am looking to organize my chat application messages by date, similar to the layout in Microsoft Teams app. Here is an example of the message data: [ { "id": 577, "source": { "userID": 56469, ...

extract the field name from the json object

I need to send coordinates to the Google Maps API, but I'm struggling to remove the field name from my JSON object before sending the parameters. Object {TempPoints: "{lat: 51.478,lng: -3.192},{lat: 51.478,lng: -3.192…{lat: 51.47840998047034,lng: - ...

The functionality of Object.assign in REACT is producing unexpected and incorrect results

Hey everyone, I have a project in React with 3 components. My goal is to extract the state from these 3 components and combine them into one JSON object on a final page. The components are not nested as child and parent, so my workaround was to set the st ...

Real-time updates to HTML5 progress bar with each button click

Looking to update the HTML5 progress bar value when a number is entered in a text area and button is clicked. I will only input properly formatted integer numbers into the text area. Check out the HTML code below: <textarea id="txt" cols=20 rows=1 pla ...

Issue with React-Toastify not displaying on the screen

After updating from React-Toastify version 7.0.3 to 9.0.3, I encountered an issue where notifications are not rendering at all. Here are the steps I followed: yarn add [email protected] Modified Notification file import React from "react" ...

Tips for finding the most efficient route from a specific point on a 2D plane using an array of location objects

I am working with an array that contains objects representing various locations, and I am trying to find the closest point to a specific starting point. //location array let locations=[ { x_axis:900, y_axis:900, }, { x_axis:800, y_axis:800, }, { x_ax ...

Tips on altering the input content in React Js?

I am currently working on developing a component for my application where I want to create a button that, when clicked, opens an input field. After entering text into the input field and clicking the button again, another input field should appear, and so ...