Air for Android - 未定义属性EncryptedLocalStore

时间:2012-03-02 11:32:47

标签: actionscript-3 flex air

我正在使用 Adob​​e Flash CS5 构建 AIR 2.5 应用。通过发布 Air for Android 我收到了这个错误:

1120: Access of undefined property EncryptedLocalStore.

这是我的代码:

function saveIt(keybg:String, myvaluebg:String):void
{
var bytesbg:ByteArray = new ByteArray(); 
      bytesbg.writeUTFBytes(myvaluebg); 
      EncryptedLocalStore.setItem(keybg, bytesbg);
}

我是否需要抛弃所有代码才能删除 EncryptedLocalStore 相关代码,还是有更智能的方法可用?

是否 EncryptedLocalStore 不支持Air for Android?

感谢。 乌利

2 个答案:

答案 0 :(得分:2)

EncryptedLocalStore documentation

  • “此外,AIR 3之前的移动平台不支持此功能。”

升级到AIR 3或更高版本。

答案 1 :(得分:0)

我不确定你的问题,如果这是一个运行时或编译时错误,所以无论如何都会这样:

[编译时间]

导入语句中的类是否位于类的顶部?

import com.adobe.air.crypto.EncryptionKeyGenerator;

[<强>运行

keybgbytesbg都不是空值。