设为首页 加入收藏

TOP

iOS之There was an internal API error错误
2017-10-13 10:02:18 】 浏览:4027
Tags:iOS There was internal API error 错误

There was an internal API error.

错误原因:把Product Name作为程序名称,程序名称错乱

解决方法:检查Product Name, 不要包含中文以及特殊字符。在info.plist中新增Bundle display name:我的程序名称。程序名称改为英文,Product Name也改为一样的。 

-----------------------------------------------------------------------

当我们改了工程的名称之后,运行程序时,提示找不到app。

原因如下:

1.由于一个工程里有两个target,暂且称为target A和target B吧!在更改了工程名后,在模拟器中运行时就报以下错误:

ld: file not found: /Users/xxx/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/xxx.app/xxx

clang: error: linker command failed with exit code 1 (use -v to see invocation)

 

2.有可能是项目名不同造成的,建议按下面的路径更改项目名,

Build Setting----》Product Name---

如果检查工程发现,项目名没问题。

 

3.下面是另一种解决方案:

Xcode/Build Settings/Packaging/Private Headers Folder Path路径和Product Module Name 下的名字改为你的项目名称就可以了

检查工程后发现,这个也是没错的。

 

4.经过几番曲折,然后发现是由于工程中的target A和target B管理混乱的问题。按下面路径

Product —> Scheme —> Manage Schemes

打开schemes管理面板,然后删除该删除的,关联该关联的,问题就解决了。

有些问题也许前两种方案就能解决了,但是如果一个工程在更改了工程名后,target A和target B管理出现了问题,那么第4个解决方案就能帮助到你了!

 

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇UIScrollView之轮转图片 下一篇iOS之There was an internal API ..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目