Android的应用程序ID preFIX问题应用程序、问题、Android、preFIX

2023-09-08 12:16:31 作者:垃圾又无趣

我建立一个Adobe空气的Andr​​oid应用程序,我有一个很大的问题,我使用保存应用程序ID以preFIX一个古老的闪空气扩展发表一个应用程序到Android Market的应用程序。

I am building an Adobe Air for Android App and I have a big problem, i published an app to the android market using an old flash air extension that saved the app id with a prefix 'app.'

现在,我已经升级了,现在保存应用程序ID以preFIX扩展名为空气。

Now that i have upgraded the extension it now saves the app id with a prefix 'air.'

这句话的意思是,我无法再更新发布到我的应用程序;所以我能做些什么?

What this means is that I can no longer publish updates to my applications; so what can I do?

与使用过时的分机的问题是,在发布更新后的用户不能够打开该应用直到缓存的文件被清除。

The problem with using the outdated extension is that after publishing the update the user is not able to open the app until the cache files are cleared.

推荐答案

有一个简单的环境变量,你可以设置为禁用的空气。 preFIX容易。下面code存在于Adobe AIR的打包:

There is a simple environment variable you can set to disable the air. prefix easily. The following code exists in the Adobe AIR packager:

String optOut = System.getenv("AIR_NOANDROIDFLAIR");
if ((optOut == null) || (optOut.indexOf("true") == -1)) {
  packageName = "air." + packageName;
}

因此​​,只需将 AIR_NOANDROIDFLAIR 环境变量,重新打包应用程序,并且它不会有在的空气。 preFIX。谷歌如何设置窗口或的 MAC 为您的特定操作系统版本。

So, simply set the AIR_NOANDROIDFLAIR environment variable to true, repackage your application, and it won't have the air. prefix. Google how to set environment variables in windows or mac for your particular OS version.

例如,我用命令行编​​译器在Mac / Linux的,所以我运行:

For example, I use the command-line compiler on Mac/Linux, so I run:

> export AIR_NOANDROIDFLAIR=true
> java -jar $AIR_HOME/lib/adt.jar -package -target apk-captive-runtime -storetype pkcs12 -keystore cert.p12 -storepass *** Main.apk Main-app.xml Main.swf

警告:我不知道这影响了。每别人的笔记上面,这可能仅仅是一个带俘虏运行时是一个好主意(不过这是默认的AIR 3.8前进)。

Warning: I don't know what implications this has. Per someone's note above, this may only be a good idea with captive runtime (but that's the default going forward from AIR 3.8).

更新:的Renaun埃里克森说这个标志应该不会造成问题。

Update: Renaun Erickson said this flag shouldn't cause problems.

跨发布here (稍有不同的问题,同样的答案)。

Cross-posted here (slightly different question, same answer).