Android Alloy.js中的全局变量

Android Alloy.js中的全局变量,android,appcelerator-titanium,titanium-alloy,Android,Appcelerator Titanium,Titanium Alloy,我有一个旧的应用程序与Appcelerator钛SDK 5.0,我需要把钛SDK 7.5。此应用程序在Android中运行 在Alloy.js文件中定义了几个var,然后我需要在几个.js文件中使用它 Alloy.js var Temperaturas[]; var Confort; Index.js Alloy.Globals.Temperaturas[0]=25; Alloy.Globals.Temperaturas[1]=23; Alloy.Globals.Confort=21; Pr

我有一个旧的应用程序与Appcelerator钛SDK 5.0,我需要把钛SDK 7.5。此应用程序在Android中运行

在Alloy.js文件中定义了几个var,然后我需要在几个.js文件中使用它

Alloy.js

var Temperaturas[];
var Confort;
Index.js

Alloy.Globals.Temperaturas[0]=25;
Alloy.Globals.Temperaturas[1]=23;
Alloy.Globals.Confort=21;
Programacion.js

Alloy.Globals.Temperaturas[0]=27;
Alloy.Globals.Temperaturas[1]=27;
Alloy.Globals.Confort=22;
问题是var Confort运行正常,但温度不正常

我怎么能做到呢


谢谢不要在alloy.js上使用var


通过Alloy.js上的
Alloy.Globals.temperatureas=[]
更改
var-temperatureas[]
,不要在Alloy.js上使用var

通过Alloy.js上的Alloy.Globals.temperatureas=[]更改
var temperatureas[]