简体   繁体   English

Flex Mobile:Android / iOS的不同文件名

[英]Flex Mobile: Different filenames for Android/iOS

I'm creating an app to deploy for iOS and Android and I'd like to give them slightly different filenames (need to add a space so that name displays on two lines on Android). 我正在创建一个要部署到iOS和Android的应用程序,我想给它们提供略有不同的文件名(需要添加一个空格,以便在Android上两行显示名称)。 Is there a way for me to define this in the app.xml without having to change it each time I export? 有没有一种方法可以在app.xml中定义它,而不必每次导出时都进行更改?

There are a few ways to do this. 有几种方法可以做到这一点。 One would be to use a build script like Maven or Ant to build it for you and specify a different name in the app.xml for both the Android and iOS version. 一种方法是使用Maven或Ant之类的构建脚本为您构建它,并在Android和iOS版本的app.xml中指定其他名称。 There might be a way to do this within Flash Builder (which I assume you're using) by using some kind of environment variable. 通过使用某种环境变量,可以在Flash Builder(我假设您正在使用)中实现此目的。

Another way to do this would be to create 2 different projects, one for Android and one for iOS, then create a "common" library between the two where most of the code lies. 执行此操作的另一种方法是创建两个不同的项目,一个用于Android,一个用于iOS,然后在两个包含大部分代码的位置之间创建一个“公共”库。 I prefer this approach as I've noticed some inconsistencies where the code behaves differently in different OS'. 我更喜欢这种方法,因为我注意到一些不一致之处,其中代码在不同的OS中表现不同。 By doing this approach, you can circumvent those edge cases, like the one you're currently having. 通过这种方法,您可以避开那些边缘情况,例如您当前遇到的情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM