构建钛应用程序后如何压缩它的大小?

发布于 2025-01-06 14:35:42 字数 259 浏览 0 评论 0 原文

我构建了一个登录应用程序,其中有 3 个 Windows

  1. 登录 Windows
  2. 注册 Windows
  3. 登录后有关用户的详细信息窗口

在此应用程序中,数据库存储有关用户的数据。该应用程序旨在成为多平台和多平台的应用程序。在 iPhone 或 Android 上运行。

当我安装在设备中时,它需要 12MB 或更大的大小(应用程序大小 12MB 或更大的大小)。

我怎样才能压缩它?

I built a Login application in which I have 3 Windows

  1. Log In Windows
  2. Registration Windows
  3. After Log in details window about the user

In this application, the database stores data about user. The app is intended to be multi-platform & run on iPhone or Android.

When I install in device than it take 12MB or more Size (application size 12MB or more size).

How can I compress it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

波浪屿的海角声 2025-01-13 14:35:42

您可以尝试以下几项操作:

  1. 创建一个新的 Titanium 项目并将其部署到您的设备。这可能是您可以获得的最小尺寸。将此最小大小添加到资源文件夹的大小中,结果应约为 12mb。如果是这样,您就无能为力了。

  2. 检查您的资源文件夹并删除您不希望包含在应用中的任何内容,例如 .psd 文件。您在评论中提到的构建文件夹与实际应用程序大小关系不大。

  3. 确保您尚未安装任何模块。检查 /Library/Application Support/Titanium/modules 是否有任何不应存在的模块。例如,我默认有 14 个模块。

  4. 如果您非常绝望,您可以尝试破解 Xcode 以删除您不使用的类。请参阅此处“专业”开发人员的回复 http://developer.appcelerator.com/question/133971/why-are-the-size-of-titanium-showcase-apps-so-small#answer-233668 这不会这并不容易,只能作为最后的手段来尝试。

但一般来说,无需太努力地减小文件大小。根据我的经验,即使添加了更多的窗口和功能,文件大小也几乎不会增加几 MB。

另请注意,您的发布文件大小可能小于您在设备上测试的应用程序。请参阅 http://developer.appcelerator.com/question/126632/android-apk-文件大小

Here are several things you can try:

  1. Create a new Titanium project and deploy it to your device. This is likely the minimum size you can attain. Add this minimum size to the size of your Resources folder and the result should be around the same as 12mb. If so, there is little more you can do.

  2. Check your Resources folder and remove anything that you don't want included in your app, such as .psd files. The build folders you mentioned in your comments have little to do with the actual app size.

  3. Make sure you have not installed any modules. Check /Library/Application Support/Titanium/modules for any modules that shouldn't be there. I have 14 modules there by default, for example.

  4. If you are very desperate, you can attempt to hack in Xcode to remove classes that you aren't using. See the responses by the "professional" developer here http://developer.appcelerator.com/question/133971/why-are-the-size-of-titanium-showcase-apps-so-small#answer-233668 This won't be easy and should only be attempted as a last resort.

In general however, there is no need to try too hard to reduce the file size. From my experience, even after adding a lot more windows and functionality, the file size barely increases by a couple of MB.

Also, note that your release file size can be smaller than the app you are testing on your device. See http://developer.appcelerator.com/question/126632/android-apk-filesize

别挽留 2025-01-13 14:35:42

根据我使用 Android 的经验,如果您在设备上运行应用程序,则与部署应用程序相比,应用程序的大小要大得多。尝试以这种方式在设备上部署和安装,看看是否有任何不同。但Titanium 已经压缩了应用程序。

From my experience with Android, if you are running the application on the device, vs. deploying the application, the app size is much larger. Try deploying and installing on device that way to see if it is any different. But Titanium already compresses the application.

三生路 2025-01-13 14:35:42

以下是一些可能成为答案的问题。

  1. 您是否使用 Mac 进行 Android 和 iPhone 部署。如果是这样,与从 Windows 部署的相同应用程序相比,Android 应用程序的大小将会更大。

  2. 您可能有闪屏,现在去检查您的文件夹,看看除了闪屏和 ico 文件之外还有其他 JPEG 文件

    \build\android\res\drawable

  3. 您使用哪个版本的 Titanium SDK 来构建应用程序?如果您使用的是 1.8.1 及更高版本,请尝试使用 Titanium SDK 1.7.5 编译相同的应用程序。

注意:如果您尝试在 Mac 版 Titanium SDK 1.7.5 中编译应用程序,请确保您拥有适用于 Lion 的 XCode 4.2.1,而不是 XCode 4.3

Here are few questions which might become answer.

  1. Are you using Mac for both Android and iPhone deployment. If so, the Android App would be of larger size compared to the same App deployed from Windows.

  2. You might have splash screen, now go and check your folder here that you have any other JPEG files apart from the spash screen and ico file

    \build\android\res\drawable

  3. Which version of Titanium SDK are you using for building the Application? Try to compile the same Application using Titanium SDK 1.7.5, if you are using 1.8.1 and above.

Note: If you are trying to compile your App in Titanium SDK 1.7.5 for Mac, make sure you have XCode 4.2.1 for Lion and Not XCode 4.3.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文