与MvvmCross问题和Android上的链接 [英] issues with MvvmCross and linking on Android
问题描述
我用几个MvxGridView与绑定的ItemsSource一个Android应用程序
I have an Android app using several MvxGridView with ItemsSource bound
local:MvxBind="ItemsSource Groups;ItemClick ShowGroupCommand"
local:MvxBind="ItemsSource Products;ItemClick ShowProductCommand"
当运行在Release模式,链接行为='不要链接'的应用程序,应用程序的大小是20MB!一切正常。
When running app in Release mode, link behavior='Don't link', app size is 20MB!, everything works as expected.
交换链接的行为链接SDK组件只有',应用程序大小为7MB,但运行时我得到意外的行为。
下面是一些应用程序输出,更不用说与MvxGridView的问题的ItemsSource绑定:
Switching link behavior to 'Link SDK assemblies only', app size is 7MB, but when running I get unexpected behavior. Here is some of the app output which mention issues with the MvxGridView's ItemsSource binding:
我知道在Xamarin的连接选项(这里)。
I am aware of the linking options in Xamarin (here).
但我不知道我应该以使其工作要做。
But I don't know what I should do in order to make it work.
我在一个小试点工作的应用程序,我需要将其发送给客户端检查出来。当满Android应用我想与Xamarin改写和MVVMcross正在1MB它不会好看发送20MB。
我已经花了很多时间在这个问题上,没有运气,希望有人可以提供帮助。
I am working on a small pilot app, I need to send it to client to check it out. It won't look good sending 20MB when the full Android app I want to rewrite with Xamarin and MVVMcross is under 1MB. I already spent a lot of time on this issue with no luck, hope someone can help.
推荐答案
有几种方法可以解决此包括:
There are several ways to work around this including:
- 使用LinkerPleaseInclude.cs文件 - 一个是默认情况下,包的NuGet包括首发(见的 LinkerPleaseInclude.cs )
- 使用连接器的XML文件 - 像一个ReactiveUI用来MonoTouch的 - 见<一href=\"https://github.com/reactiveui/ReactiveUI/blob/rxui5-master/ReactiveUI.Platforms/Cocoa/Buildsupport/Linker.xml\"相对=nofollow> Linker.xml
- using a LinkerPleaseInclude.cs file - a starter one is included by default in the nuget packages (see LinkerPleaseInclude.cs)
- using a Linker xml file - like the one ReactiveUI uses for MonoTouch - see Linker.xml
也有很多的问题和答案就在这里这个早已:
There are also plenty of questions and answers on here about this already:
- Android应用过大和链接禁用功能
- Trouble与xamarin.ios / MonoTouch的,mvvmcross和链接
- Problems与mvvmcross绑定的IOS(可在模拟器,但有些属性不会在设备工作)
- MvvmCross MonoTouch的 - 失败绑定一个真正的iPad的性能,但它工作在模拟器上
- MvxException在释放模式为Android
- Android App is too large and Linking disables functionality
- Trouble with xamarin.ios/monotouch , mvvmcross and linking
- Problems with mvvmcross Binding on IOS (Works on Simulator, but some properties doesn't work on the Device)
- MvvmCross Monotouch - Fail to bind Properties on a real iPad, but it works on the Simulator
- MvxException in Release Mode for Android
这篇关于与MvvmCross问题和Android上的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!