我正在使用钛sdk版本5.0.2
,我试图在我的Android设备上运行该应用程序,它会抛出以下错误
[INFO] : Executing Alloy compile: cmd /s /c C:\Users\USER_NAME\.appcelerator\install\5.0.2\package\node_modules\appc-cli-titanium\node_modules\alloy\bin\alloy compile C:\Users\USER_NAME\Documents\Appcelerator_Studio_Workspace\ac (1)\Academic Communicators\app --config platform=android,version=0,simtype=none,devicefamily=none,deploytype=test,target=device --no-colors
'C:\Users\USER_NAME\.appcelerator\install\5.0.2\package\node_modules\appc-cli-titanium\node_modules\alloy\bin\alloy' is not recognized as an internal or external command,
operable program or batch file.
[ERROR] Application Installer abnormal process termination. Process exit value was 1
在终端显示
中运行ti build --platform android
Titanium Command-Line Interface, CLI version 5.0.4, Titanium SDK version 5.0.2.GA
Copyright (c) 2012-2015, Appcelerator, Inc. All Rights Reserved.
Please report bugs to http://jira.appcelerator.org/
[ERROR] JDK (Java Development Kit) not found.
[ERROR] If you already have installed the JDK, verify your JAVA_HOME environment variable is correctly set.
[ERROR] The JDK can be downloaded and installed from http://appcelerator.com/jdk.
我尝试替换项目中的alloy
文件,同时将JAVA_HOME
环境变量设置为C:\Program Files (x86)\Java\jdk1.7.0_80\bin;
,没有任何效果!帮我找到解决方案。
由于
修改
javac版本为javac 1.7.0_80
和
ti info
显示了jdk问题
Java Development Kit Issues
x JDK (Java Development Kit) not installed.
If you already have installed the JDK, verify your JAVA_HOME environment variable is correctly
set.
The JDK is required for must be manually downloaded and installed from
http://appcelerator.com/jdk.
答案 0 :(得分:0)
尝试运行ti info
以查看缺少的内容。还要检查PATH变量。你说你设置JAVA_HOME所以你应该能够运行" javac --version"从一个终端。如果这不起作用,请将路径添加到PATH。