在MobileFirst Studio中获取“无法解析主机名”

时间:2015-09-16 10:45:56

标签: eclipse ibm-mobilefirst

今天我安装了新的eclipse和mobileFirst(V7.1.0)插件。安装成功后,我创建了MobileFirst Project并创建了android环境。但是我在创建android环境后面临一些奇怪的问题。即使我能够毫无问题地打开我的控制台。以下是错误。

注意:我还尝试在终端中使用eclipse -clean命令启动eclipse。还卸载并重新安装了mobileFirst插件。

  

获取MobileFirst Platform控制台网址失败 - 无法解决   主机名。                                     java.net.InetAddress.getLocalHost(InetAddress.java:1473)                                     com.worklight.builder.environment.MobileApplicationBuilder.getTokens(MobileApplicationBuilder.java:498)                                     com.worklight.builder.environment.ClientApplicationBuilder.createClientProjectBuilder(ClientApplicationBuilder.java:104)                                     com.worklight.builder.environment.ClientApplicationBuilder.getNewProjectBuilder(ClientApplicationBuilder.java:88)                                     com.worklight.builder.environment.ClientApplicationBuilder.getProjectBuilder(ClientApplicationBuilder.java:70)                                     com.worklight.builder.environment.MobileApplicationBuilder.build(MobileApplicationBuilder.java:172)                                     com.worklight.builder.ApplicationBuilder.buildEnvironment(ApplicationBuilder.java:288)                                     com.worklight.builder.ApplicationBuilder.buildEnvironments(ApplicationBuilder.java:247)                                     com.worklight.builder.ApplicationBuilder.build(ApplicationBuilder.java:111)                                     com.worklight.builder.ApplicationBuilder.build(ApplicationBuilder.java:87)                                     com.worklight.studio.plugin.launch.build.apps.WorkspaceApplicationBuilder.buildApplication(未知   资源)                                     com.worklight.studio.plugin.launch.build.apps.WorkspaceApplicationBuilder.runInWorkspace(未知   资源)                                     com.worklight.studio.plugin.launch.build.apps.WorkspaceApplicationBuilder.buildApplicationSynchronously(未知   资源)                                     com.worklight.studio.plugin.wizards.newenvironment.helper.EnvironmentHelper $ 1.runInWorkspace(未知   资源)                                     org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)                                     org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

1 个答案:

答案 0 :(得分:2)

您可以尝试以下选项之一:

  1. 杀死Java进程并再试一次
  2. 在Eclipse中>服务器视图,双击 MobileFirst Development Server 条目并使用您的IP地址编辑hostname字段
  3. 编辑hosts文件 - 添加主机名。

    • Finder>去>转到文件夹> /private/etc/hosts
    • 将您的主机名添加到以127.0.0.1开头的行中,例如:
      127.0.0.1 mbp-idan localhost
    • 您可能需要退出并从用户
    • 登录