菜鸟教程小白 发表于 2022-12-11 22:41:55

iOS Build 在 Xcode 中很好,但 Appcenter.ms 失败


                                            <p><p>在 Xcode 中运行、存档和构建我的应用程序给了我一个 <code>multiple commands generated</code> 错误。</p>
<p>所以我找到了 <a href="https://github.com/facebook/react-native/issues/20492#issuecomment-422958184" rel="noreferrer noopener nofollow">Github Link</a>他们说要添加以下内容:</p>
<pre><code>post_install do |installer|
      installer.pods_project.targets.each do |target|
               
                # The following is needed to ensure the &#34;archive&#34; step works in XCode.
                # It removes React &amp; Yoga from the Pods project, as it is already included in the main project.
                # Without this, you&#39;d see errors when you archive like:
                # &#34;Multiple commands produce ... libReact.a&#34;
                # &#34;Multiple commands produce ... libyoga.a&#34;
               
                targets_to_ignore = %w(React yoga)
               
                if targets_to_ignore.include? target.name
                        target.remove_from_project
                end
               
      end
end
</code></pre>
<p>这让我可以归档我的应用程序并通过 XCode 在设备上成功运行它。然而,当试图在 <a href="https://Appcenter.ms" rel="noreferrer noopener nofollow">Appcenter.ms</a> 上构建它时我收到以下错误,老实说,我不知道该怎么做,因为它在 XCode 上运行良好,所以我无法针对它进行测试。</p>
<blockquote>
<p>ld: 473 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)</p>
<p>** ARCHIVE FAILED **</p>
</blockquote>
<p>有人对我能做什么有任何想法吗?这是 <a href="https://pastebin.com/raw/B4Pd7uDK" rel="noreferrer noopener nofollow">link to my logs</a>关于添加的所有重复错误。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>转到您的build设置并搜索 No Common Blocks 并查看它的设置。如果设置为 YES,请尝试将其设置为 NO。某些版本的 xCode 默认为 YES。</p></p>
                                   
                                                <p style="font-size: 20px;">关于iOS Build 在 Xcode 中很好,但 Appcenter.ms 失败,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/55657491/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/55657491/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: iOS Build 在 Xcode 中很好,但 Appcenter.ms 失败