【问题标题】:Adobe AIR EncryptedLocalStore ProblemsAdobe AIR 加密本地存储问题
【发布时间】:2011-02-13 05:13:24
【问题描述】:

在我的机器上安装应用程序后,加密的本地存储将无法运行。我在这台计算机上使用 encryptedlocalstore 时遇到了问题,所以我设置了一个基本的测试程序。

从 adl 运行时一切正常,但在正常运行时无法正常运行。如果我从 .app/Contents/Resources 文件夹内对已安装的应用程序运行 adl,应用程序工作正常,但正常运行时会失败。

我已尝试删除整个 ~/Library/Application Support/Adobe/AIR/ELS 文件夹,但无济于事。我卸载并重新安装了 Adob​​e Air 2.5.1,但 ELS 仍然失败。应用程序的文件夹是在 ELS 文件夹中创建的,但没有调用 ELS 函数,并抛出错误消息“一般内部错误”。错误消息没有附加堆栈跟踪。

我正在运行 Mac OSX 10.6.6

代码很简单,不过我还是附上吧。

有什么想法吗?

<?xml version="1.0"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   applicationComplete="init()">

<s:layout>
    <s:VerticalLayout/>
</s:layout>

<fx:Script><![CDATA[
    import mx.controls.Alert;

    protected function init():void
    {
        output.text += "before\n";

        try
        {
            var data:ByteArray = EncryptedLocalStore.getItem("testItem");
            if (!data)
            {
                output.text += "Value not set\n";
            }
            else
            {
                output.text += "Value Was: " + data.readUTFBytes(data.bytesAvailable) + "\n";
                EncryptedLocalStore.removeItem("testItem");
                output.text += "Item Removed\n";
            }
        }
        catch (e:Error)
        {
            output.text += e.message + "\n";
            output.text += e.getStackTrace() + "\n";
        }

        output.text += "after\n";
    }

    protected function storeItem():void
    {
        var bytes:ByteArray = new ByteArray();
        bytes.writeUTFBytes(toStore.text);
        EncryptedLocalStore.setItem("testItem", bytes);
        output.text += "Value Stored: " + toStore.text + "\n";
    }
    ]]></fx:Script>

<s:TextInput id="toStore"/>
<s:Button click="storeItem()" label="Store Val"/>
<s:TextArea id="output"/>

【问题讨论】:

    标签: macos air adobe storage


    【解决方案1】:

    此问题已在此处的 Adob​​e Air 论坛上解决 http://forums.adobe.com/thread/790858?tstart=0

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-09-16
      • 1970-01-01
      • 1970-01-01
      • 2017-06-16
      • 1970-01-01
      • 2014-04-14
      • 2011-07-05
      • 1970-01-01
      相关资源
      最近更新 更多