Xamarin.forms 在设备上安装时,使用AOT和LLVM会使应用程序大小过大
我尝试在android上使用AOT和LLVM来减少xamarin表单应用程序的启动时间。这真是个骗局。我有大约10-12秒,现在谷歌firebase根据如下所示的设备在2-7秒之间报告 我的设置如下:; -链接SDK和用户程序集 -捆绑到本机程序集中 -前卫 -没有写符号,nodebug -每个ABI的单独Apk 相关组的项目文件如下所示Xamarin.forms 在设备上安装时,使用AOT和LLVM会使应用程序大小过大,xamarin.forms,xamarin.android,Xamarin.forms,Xamarin.android,我尝试在android上使用AOT和LLVM来减少xamarin表单应用程序的启动时间。这真是个骗局。我有大约10-12秒,现在谷歌firebase根据如下所示的设备在2-7秒之间报告 我的设置如下:; -链接SDK和用户程序集 -捆绑到本机程序集中 -前卫 -没有写符号,nodebug -每个ABI的单独Apk 相关组的项目文件如下所示 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyC
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
<DebugType>
</DebugType>
<AndroidLinkMode>Full</AndroidLinkMode>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
<AndroidCreatePackagePerAbi>true</AndroidCreatePackagePerAbi>
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
<AotAssemblies>true</AotAssemblies>
<EnableLLVM>true</EnableLLVM>
<AndroidAotAdditionalArguments>no-write-symbols,nodebug</AndroidAotAdditionalArguments>
<DebugSymbols>false</DebugSymbols>
<BundleAssemblies>true</BundleAssemblies>
<AndroidEnableMultiDex>True</AndroidEnableMultiDex>
<EnableProguard>true</EnableProguard>
<Debugger>Xamarin</Debugger>
<AndroidSupportedAbis>armeabi-v7a;x86;x86_64</AndroidSupportedAbis>
<AndroidLinkSkip>Akavache;Akavache.Sqlite3;SQLiteNetExtensions;SQLiteNetExtensionsAsync;SQLite.Net;SQLite.Net.Async;Syncfusion.DataSource.Portable;Syncfusion.Data.Portable;Syncfusion.Pdf.Portable;Syncfusion.SfDataGrid.XForms;Syncfusion.SfNumericUpDown.XForms;Syncfusion.SfDataGrid.XForms.Android;Syncfusion.SfNavigationDrawer.Android;Syncfusion.SfNavigationDrawer.XForms;Syncfusion.SfNavigationDrawer.XForms.Android;Syncfusion.SfSchedule.XForms;Syncfusion.SfSchedule.XForms.Android;Syncfusion.SfSchedule.Android;Syncfusion.Compression.Portable;Xamarin.GooglePlayServices.AppIndexing;Xamarin.Insights;Splat;Xamarin.GooglePlayServices.Basement;Xamarin.FireBase.AppIndexing;Xamarin.FireBase.Common;Xamarin.GooglePlayServices.Gcm;</AndroidLinkSkip>
<AndroidEnableMultipleDex>true</AndroidEnableMultipleDex>
<AndroidExplicitCrunch>true</AndroidExplicitCrunch>
</PropertyGroup>
真的
bin\Release\
痕迹
促使
4.
使用AOT+LLVVM捕获。。看黄色的高亮灯确实是我们需要安装的apk根据以前的apk。我不知道我是否需要任何额外的库来运行AOT,但为什么会有那些带蓝色下划线的第三方库。它们应该像第一个屏幕截图中那样绑定到本机程序集中。
我是否理解错了,或者Xamarin在将包与AOT一起使用到本机程序集中时存在错误
没有人会回答:(,这是“terra incognita”。我也有类似的问题。我使用AOT(没有LLVVM)。这是“快速”(5秒:()启动一个应用程序。@FetFrumos我认为LLVVM不会影响启动时间,但对总体性能有好处。我的应用程序无论使用LLVM还是不使用LLVM启动都很快,但我尝试使用两者打包,但两者都存在巨大的大小问题。LLVM在apk上额外增加了3 mb,但当安装的大小与LLVVM几乎相同时。因此它是巨大的