我已经用MFP做了几个项目,但是今天早上我创建了一个全新的项目:
mfp create feb21
cd feb21
mfp add hybrid
mfp add environment (selected iphone + android)
mfp start开始时,它运行,但在iPhone区域失败:
生成失败的/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:128:执行此行时发生了以下错误: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:305:执行此行时发生了以下错误: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:315:执行这一行时发生以下错误: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:294:失败的构建应用程序: com.worklight.builder.exception.WorklightBuildException: com.worklight.builder.exception.WorklightBuildRuntimeException:资源管理器-读取info.plist文件/Users/raymondcamden/Desktop/trash/feb21/apps/App1/iphone/native/Entitlements-Debug.plist (没有此类文件或目录)的问题-嵌套异常: /Users/raymondcamden/Desktop/trash/feb21/apps/App1/iphone/native/Entitlements-Debug.plist (没有这样的文件或目录)
然后我又试了一次,因为它太糟糕了,现在它在Android领域失败了:
生成失败的/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:128:执行此行时发生了以下错误: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:305:执行此行时发生了以下错误: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:315:执行这一行时发生以下错误: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:294:未能构建应用程序: com.worklight.builder.exception.WorklightBuildException: com.worklight.builder.exception.WorklightBuildRuntimeException:资源管理器-读取XML文件时出错: /Users/raymondcamden/Desktop/trash/feb21/apps/App1/android/native/AndroidManifest.xml (无此类文件或目录)嵌套异常:/User/raymondcamden/Desktop/trash/feb21/apps/App1/android/native/AndroidManifest.xml (没有这样的文件或目录)
经过多次重试,我只会在这方面出错。我可以确认这个文件确实不存在,但是我不知道为什么。
发布于 2015-02-23 09:55:38
如果您没有任何本机代码,那么删除环境- iPhone和android,然后再添加。我也有同样的问题,移除和添加环境就是其中的诀窍。
发布于 2015-03-04 16:14:10
当未知发生时,最后的资源是清理mfp环境。至少对Mac来说,请尝试如下:
检查是mfp测试服务器,分析服务正在运行并杀死它们。一种方法是重新启动您的计算机。
另一种方法是使用lsof查找进程ID (PID):
$ lsof -i :10080
COMMAND PID USER FD TYPE
java 70031 csantana23 171u IPv4 0xc20be7c0903a7517 0t0 TCP *:10080 (LISTEN)
$lsof -i :10777
COMMAND PID USER FD TYPE
java 70031 csantana23 6u IPv4 0xc20be7c0aee2c9f7 0t0 TCP *:10777 (LISTEN)使用lsof输出的PID值终止进程:
$ kill -9 70031清除MFP测试服务器的临时目录:
$ rm -r $HOME/.ibm/mobilefirst创建一个用于iOS和安卓的混合应用程序的新项目:
$ mfp create MFProject
A MobileFirst Project was successfully created at /Users/csantana23/MFProject
$ cd MFProject/
$ mfp add hybrid App1
A new Hybrid App was added at /Users/csantana23/MFProject/apps/App1
$ cd apps/App1/
$ mfp add environment iphone,android
A new android Environment was added at /Users/csantana23/MFProject/apps/App1/android
A new iphone Environment was added at /Users/csantana23/MFProject/apps/App1/iphone
$ mfp start
Cannot find the server configuration. Creating a new MobileFirst test server.
Initializing MobileFirst Console.
Starting server worklight.
Server worklight started with process ID 70325.
$ mfp preview希望这能有所帮助!
https://stackoverflow.com/questions/28646161
复制相似问题