我们应该支持哪些 Xamarin ABI
Which Xamarin ABIs should we support
在我看来,目前我们的 Xamarin Android 应用程序 (PCL) 非常庞大,即使在发布模式下也是如此。我怀疑这是由于支持的架构。目前我们已将它们全部 selected。有谁知道我们是否必须 select 所有这些?我们也根本没有使用 Android NDK。
我将从 中复制部分答案。
Make sure you are at least checking the following architectures: armeabi-v7a and x86. You could do the other three but we do not since we use LLVM compiling in release mode, which is not compatible with the 64 bit architectures (except for armeabi, which is deprecated). The good thing about that is that all of the 64 bit architectures can still use 32 bit builds so they all still get covered if you check those 3.
所以我只会检查这 3 个,除非你有特定的理由检查其他的。我们在仅使用这 3 个的设备上安装我们的应用程序时遇到了 0 个问题。
附带说明一下,打开 LLVM 编译和优化您的 icons/images 将有助于最终的 APK 大小。
*编辑:自从写这篇文章后,我们仅在某些设备(Android Nexus 9)上 运行 进入 a bug,这会导致应用程序在启动时崩溃。解决方法是查看arm64-v8a架构。这可能会增加应用程序的大小,因此请权衡利弊,看看在包含架构后它对您的 APK 大小有多大影响,或者在必要时为每个架构拆分您的 APK。
不,您不必 select 所有这些。如果您想减小 .apk
的大小,可以为每个 ABI
创建一个 .apk
。 注意:推荐的方法是您开发并发布单个 .apk
. 然而这并不总是可行的,有时创建单独的更好。虽然此答案仅深入探讨了不同的 CPU 架构 (ABI),但您也可以针对屏幕尺寸、设备功能和 API 级别创建不同的 .apk
。
https://developer.xamarin.com/guides/android/advanced_topics/build-abi-specific-apks/
http://developer.android.com/google/play/publishing/multiple-apks.html
我建议使用 WinDirStat(https://windirstat.info/) or Disk Inventory X(http://www.derlien.com/) 之类的工具来调查为什么 .apk
如此之大。您可能会发现 .apk
很大的其他原因,例如资源(图像、原始文件)、程序集等
在我看来,目前我们的 Xamarin Android 应用程序 (PCL) 非常庞大,即使在发布模式下也是如此。我怀疑这是由于支持的架构。目前我们已将它们全部 selected。有谁知道我们是否必须 select 所有这些?我们也根本没有使用 Android NDK。
我将从
Make sure you are at least checking the following architectures: armeabi-v7a and x86. You could do the other three but we do not since we use LLVM compiling in release mode, which is not compatible with the 64 bit architectures (except for armeabi, which is deprecated). The good thing about that is that all of the 64 bit architectures can still use 32 bit builds so they all still get covered if you check those 3.
所以我只会检查这 3 个,除非你有特定的理由检查其他的。我们在仅使用这 3 个的设备上安装我们的应用程序时遇到了 0 个问题。
附带说明一下,打开 LLVM 编译和优化您的 icons/images 将有助于最终的 APK 大小。
*编辑:自从写这篇文章后,我们仅在某些设备(Android Nexus 9)上 运行 进入 a bug,这会导致应用程序在启动时崩溃。解决方法是查看arm64-v8a架构。这可能会增加应用程序的大小,因此请权衡利弊,看看在包含架构后它对您的 APK 大小有多大影响,或者在必要时为每个架构拆分您的 APK。
不,您不必 select 所有这些。如果您想减小 .apk
的大小,可以为每个 ABI
创建一个 .apk
。 注意:推荐的方法是您开发并发布单个 .apk
. 然而这并不总是可行的,有时创建单独的更好。虽然此答案仅深入探讨了不同的 CPU 架构 (ABI),但您也可以针对屏幕尺寸、设备功能和 API 级别创建不同的 .apk
。
https://developer.xamarin.com/guides/android/advanced_topics/build-abi-specific-apks/
http://developer.android.com/google/play/publishing/multiple-apks.html
我建议使用 WinDirStat(https://windirstat.info/) or Disk Inventory X(http://www.derlien.com/) 之类的工具来调查为什么 .apk
如此之大。您可能会发现 .apk
很大的其他原因,例如资源(图像、原始文件)、程序集等