Titanium:在创建New Mobile App项目时和运行现有项目时出现NullPointerException

时间:2014-02-17 10:46:45

标签: android titanium

我正在工作或宁愿尝试使用钛工作的Android项目当我尝试创建一个新的移动应用程序时,我得到了这个例外,

我正在使用

Titanium SDK: 3.2.1GA,

也尝试过:mobilesdk-3.2.2.v20140214120903-win32

mobilesdk-3.2.1.v20140206170116-win32

因为在某处它说这是bug

还试过使用jre 1.6(32位)因为我读到它不支持1.7 here

在系统路径变量中添加了jre6路径,但仍然无法在钛中获取我的Hello world项目,谢谢

这是错误的堆栈跟踪当我单击新项目向导上的finsh按钮时

!ENTRY com.aptana.projects 2 0 2014-02-17 14:59:05.908
!MESSAGE Internal error: 
!STACK 1
org.eclipse.core.runtime.CoreException: 
    at com.aptana.projects.wizards.AbstractNewProjectWizard$1.run(AbstractNewProjectWizard.java:253)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2327)
    at com.aptana.projects.wizards.AbstractNewProjectWizard.doCreateProject(AbstractNewProjectWizard.java:321)
    at com.aptana.projects.wizards.AbstractNewProjectWizard$2.run(AbstractNewProjectWizard.java:374)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.NullPointerException
    at java.lang.ProcessBuilder.start(Unknown Source)
    at com.aptana.core.util.ProcessUtil.startProcess(ProcessUtil.java:589)
    at com.aptana.core.util.ProcessUtil.doRun(ProcessUtil.java:527)
    at com.aptana.core.util.ProcessUtil.doRun(ProcessUtil.java:462)
    at com.aptana.core.util.ProcessUtil.run(ProcessUtil.java:445)
    at com.aptana.core.util.ProcessUtil.run(ProcessUtil.java:407)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.run(NodeJSExecuter.java:302)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.run(NodeJSExecuter.java:403)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.runCommand(NodeJSExecuter.java:221)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.runCommandWithNoLogin(NodeJSExecuter.java:431)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.login(NodeJSExecuter.java:466)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.run(NodeJSExecuter.java:255)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.run(NodeJSExecuter.java:403)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.runCommand(NodeJSExecuter.java:221)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.runCommandLoggedIn(NodeJSExecuter.java:444)
    at com.appcelerator.titanium.core.internal.cli.NodeTitaniumSDKCommandsHandler.createProject(NodeTitaniumSDKCommandsHandler.java:124)
    at com.appcelerator.titanium.ui.ide.wizard.NewMobileProjectWizard.finalizeProjectCreation(NewMobileProjectWizard.java:143)
    at com.appcelerator.titanium.ui.wizard.BasicNewTitaniumProjectWizard.createNewProject(BasicNewTitaniumProjectWizard.java:300)
    at com.aptana.projects.wizards.AbstractNewProjectWizard$1.run(AbstractNewProjectWizard.java:249)
    ... 5 more
!SUBENTRY 1 com.aptana.projects 4 0 2014-02-17 14:59:05.909
!MESSAGE 
!STACK 0
java.lang.NullPointerException
    at java.lang.ProcessBuilder.start(Unknown Source)
    at com.aptana.core.util.ProcessUtil.startProcess(ProcessUtil.java:589)
    at com.aptana.core.util.ProcessUtil.doRun(ProcessUtil.java:527)
    at com.aptana.core.util.ProcessUtil.doRun(ProcessUtil.java:462)
    at com.aptana.core.util.ProcessUtil.run(ProcessUtil.java:445)
    at com.aptana.core.util.ProcessUtil.run(ProcessUtil.java:407)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.run(NodeJSExecuter.java:302)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.run(NodeJSExecuter.java:403)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.runCommand(NodeJSExecuter.java:221)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.runCommandWithNoLogin(NodeJSExecuter.java:431)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.login(NodeJSExecuter.java:466)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.run(NodeJSExecuter.java:255)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.run(NodeJSExecuter.java:403)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.runCommand(NodeJSExecuter.java:221)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.runCommandLoggedIn(NodeJSExecuter.java:444)
    at com.appcelerator.titanium.core.internal.cli.NodeTitaniumSDKCommandsHandler.createProject(NodeTitaniumSDKCommandsHandler.java:124)
    at com.appcelerator.titanium.ui.ide.wizard.NewMobileProjectWizard.finalizeProjectCreation(NewMobileProjectWizard.java:143)
    at com.appcelerator.titanium.ui.wizard.BasicNewTitaniumProjectWizard.createNewProject(BasicNewTitaniumProjectWizard.java:300)
    at com.aptana.projects.wizards.AbstractNewProjectWizard$1.run(AbstractNewProjectWizard.java:249)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2327)
    at com.aptana.projects.wizards.AbstractNewProjectWizard.doCreateProject(AbstractNewProjectWizard.java:321)
    at com.aptana.projects.wizards.AbstractNewProjectWizard$2.run(AbstractNewProjectWizard.java:374)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

当我右键单击示例项目Run as - >时,这是个例外。选择模拟器:

!ENTRY org.eclipse.core.jobs 4 2 2014-02-17 16:16:18.021
!MESSAGE An internal error occurred during: "Launching Titanium Android Emulator - Kitchen Sink".
!STACK 0
java.lang.NullPointerException
    at java.lang.ProcessBuilder.start(Unknown Source)
    at com.aptana.core.util.ProcessUtil.startProcess(ProcessUtil.java:589)
    at com.aptana.core.util.ProcessUtil.doRun(ProcessUtil.java:527)
    at com.aptana.core.util.ProcessUtil.doRun(ProcessUtil.java:462)
    at com.aptana.core.util.ProcessUtil.run(ProcessUtil.java:445)
    at com.aptana.core.util.ProcessUtil.run(ProcessUtil.java:407)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.run(NodeJSExecuter.java:302)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.run(NodeJSExecuter.java:403)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.runCommand(NodeJSExecuter.java:221)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.runCommandWithNoLogin(NodeJSExecuter.java:431)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.login(NodeJSExecuter.java:466)
    at com.appcelerator.titanium.core.cli.NodeJSExecuter.run(NodeJSExecuter.java:255)
    at com.appcelerator.titanium.android.core.launching.AndroidNodeJSCommandsHelper.build(AndroidNodeJSCommandsHelper.java:285)
    at com.appcelerator.titanium.android.core.launching.AndroidNodeJSCommandsHelper.run(AndroidNodeJSCommandsHelper.java:167)
    at com.appcelerator.titanium.core.internal.cli.NodeTitaniumSDKCommandsHandler.run(NodeTitaniumSDKCommandsHandler.java:490)
    at com.appcelerator.titanium.android.core.launching.AndroidSimulatorLaunchConfigurationDelegate.launch(AndroidSimulatorLaunchConfigurationDelegate.java:228)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

编辑:

TI出人意料地工作后的堆栈跟踪,详见评论:

!ENTRY org.eclipse.core.resources 2 10035 2014-02-22 12:14:51.010
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.eclipse.ui 2 0 2014-02-22 12:14:52.663
!MESSAGE Warnings while parsing the images from the 'org.eclipse.ui.commandImages' extension point.
!SUBENTRY 1 org.eclipse.ui 2 0 2014-02-22 12:14:52.663
!MESSAGE Cannot bind to an undefined command: plug-in='com.appcelerator.titanium.android.ui', id='com.appcelerator.titanium.mobile.command.run_on_device.android'
!SUBENTRY 1 org.eclipse.ui 2 0 2014-02-22 12:14:52.663
!MESSAGE Cannot bind to an undefined command: plug-in='com.appcelerator.titanium.android.ui', id='com.appcelerator.titanium.mobile.command.debug_on_device.android'

!ENTRY org.eclipse.core.jobs 2 2 2014-02-22 12:15:09.805
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: com.appcelerator.titanium.alloy.internal.ui.AlloyTemplateInstaller$1

!ENTRY org.eclipse.core.jobs 2 2 2014-02-22 12:15:09.807
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: com.appcelerator.titanium.alloy.internal.ui.AlloyTemplateInstaller$3

!ENTRY org.eclipse.core.jobs 2 2 2014-02-22 12:15:09.808
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.Workbench$55
!SESSION 2014-02-22 12:15:10.882 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_25
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.ui 2 0 2014-02-22 12:15:42.606
!MESSAGE Warnings while parsing the images from the 'org.eclipse.ui.commandImages' extension point.
!SUBENTRY 1 org.eclipse.ui 2 0 2014-02-22 12:15:42.606
!MESSAGE Cannot bind to an undefined command: plug-in='com.appcelerator.titanium.android.ui', id='com.appcelerator.titanium.mobile.command.run_on_device.android'
!SUBENTRY 1 org.eclipse.ui 2 0 2014-02-22 12:15:42.606
!MESSAGE Cannot bind to an undefined command: plug-in='com.appcelerator.titanium.android.ui', id='com.appcelerator.titanium.mobile.command.debug_on_device.android'

!ENTRY org.eclipse.e4.ui.css.core 4 0 2014-02-22 12:15:45.837
!MESSAGE CSS property 'maximize-visible' has been deprecated: renamed as swt-maximize-visible

!ENTRY org.eclipse.e4.ui.css.core 4 0 2014-02-22 12:15:45.842
!MESSAGE CSS property 'minimize-visible' has been deprecated: renamed as swt-minimize-visible

!ENTRY com.appcelerator.titanium.ui.ide 4 0 2014-02-22 12:18:39.726
!MESSAGE (Build 3.2.1.201402041146) [ERROR] com.appcelerator.titanium.core/debug/dashboard Unknown SDK ios

!ENTRY com.appcelerator.titanium.android.core 4 0 2014-02-22 12:23:47.848
!MESSAGE There are no Android devices connected

!ENTRY org.eclipse.osgi 2 1 2014-02-22 12:41:22.681
!MESSAGE NLS missing message: MobileUsageUtil_mobile_event_error in: com.appcelerator.titanium.usage.messages

1 个答案:

答案 0 :(得分:0)

我不知道它是否对某人有帮助,因为我自己也不确定,我也添加了成功的日志。

我能想到的事情使它发挥作用:

  1. 我删除了TitaniumStudio.ini文件中添加的额外开关,以便在启动画面中绕过身份验证。
  2. 安装了adt包并创建了一个模拟器并运行它,也许它做了一些钛无法做的配置。
  3. 以上步骤解决了异常