由于 MDFInternationalization 和 MaterialComponents 目录不存在,无法 tns 构建 ios [英] Failed to tns build ios due as MDFInternationalization and MaterialComponents directories don't exist

查看:23
本文介绍了由于 MDFInternationalization 和 MaterialComponents 目录不存在,无法 tns 构建 ios的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它在 xCode工作,但在 原生脚本 tns.tns build android 没问题.

It works on xCode but not with native script tns. tns build android is fine.

当我执行 tns prepare ios &&tns build ios 我收到以下错误,因为这些目录不存在.Debug-iphonesimulator 路径确实存在,其中包含一些其他文件和文件夹,但 MDFInternationalizationMaterialComponents 不存在.

When I execute tns prepare ios && tns build ios I get the error below as those directories don't exist. The Debug-iphonesimulator path does exist with a few other files and a folder inside it but MDFInternationalization and MaterialComponents don't.

Merged 749 categories.
    Result: 43068 declarations from 140 top level modules
Done! Running time: 3.81413 sec
Saving metadata generation's stderr stream to: /Users/sylvester/randd/native-script/platforms/ios/build/Debug-iphonesimulator/metadata-generation-stderr-x86_64.txt
~/randd/native-script/platforms/ios
ld: warning: directory not found for option '-F/Users/sylvester/randd/native-script/platforms/ios/build/Debug-iphonesimulator/MDFInternationalization'
ld: warning: directory not found for option '-F/Users/sylvester/randd/native-script/platforms/ios/build/Debug-iphonesimulator/MaterialComponents'
ld: framework not found MDFInternationalization
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: directory not found for option '-F/Users/sylvester/randd/native-script/platforms/ios/build/Debug-iphonesimulator/MDFInternationalization'
ld: warning: directory not found for option '-F/Users/sylvester/randd/native-script/platforms/ios/build/Debug-iphonesimulator/MaterialComponents'
ld: framework not found MDFInternationalization
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Planning build
note: Constructing build description
** BUILD FAILED **

Command xcodebuild failed with exit code 65

我尝试使用 xCode 构建它,并且在 iPhone 模拟器中使用工作应用成功构建强>.

I tried to build this using xCode and I got a successful build with a working app in the iPhone simulator.

根据我在撰写此问题时的理解,tns 似乎无法生成这些文件夹.

As per my undersatnding at the time of writing this question, it looks like tns is failing to generate these folders.

我在这里遗漏了什么?

推荐答案

有人在 NativeScript GitHub Repos 上回答了这个问题:

Someone has answered this on the NativeScript GitHub Repos:

我发现了错误.我用错误的文件打开了项目.

I found the erro. I was openning the project by the wrong file.

这通常是由于打开了 .xcodeproj 文件而不是.xcworkspace.

This is usually caused by having the .xcodeproj file open instead of .xcworkspace.

当你第一次运行 'pod install' 时,它会创建一个.xcworkspace 文件,其中包括您的原始 .xcodeproj 和一个 Pod项目.您需要关闭 .xcodeproj 并打开.xcworkspace 代替.

When you run 'pod install' for the first time, it will create an .xcworkspace file, which includes your original .xcodeproj and a Pods project. You'll need to close your .xcodeproj and open the .xcworkspace instead.

这是通过 Xcode 的 new 创建项目时常见的问题项目向导 - 我经常忘记我不在工作区,这是需要让 Cocoapods 正确链接.

This is a common issue when creating a project through Xcode's new project wizard - I often forget that I'm not in a workspace, which is required to get Cocoapods to link correctly.

构建失败 - ld:框架未找到 Pods

这篇关于由于 MDFInternationalization 和 MaterialComponents 目录不存在,无法 tns 构建 ios的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆