“被Xamarin链接"的内容是什么?意思是? [英] What does "linked out by Xamarin" mean?

查看:105
本文介绍了“被Xamarin链接"的内容是什么?意思是?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Akavache 文档中,它说...

In the Akavache docs, it says...

在您的项目中的任何地方添加以下类,以确保 Xamarin将不会链接Akavache.Sqlite3

Add the following class anywhere in your project to make sure Akavache.Sqlite3 will not be linked out by Xamarin

被Xamarin链接"是什么意思?

What does "linked out by Xamarin" mean?

推荐答案

Xamarin.iOS链接器从已编译的应用程序中删除未使用的代码.他们检查编译后的代码,并删除所有看起来好像在应用程序运行期间将被引用的代码.

The Xamarin.Android linker and Xamarin.iOS linker remove unused code from a compiled application. They inspect the compiled code and remove any code that doesn't appear as if it would be referenced during a run of the application.

由于此分析是在已编译的二进制文件上进行的(例如,静态分析),因此在某些情况下,应用程序确实使用某些代码,但链接程序无法检测到这种用法.因此,链接器将删除此代码,即使使用该代码也是如此.当应用程序实际运行时,这会导致问题.

Because this analysis is done on a compiled binary (e.g., a static analysis), there may be some cases where an application does use some code but the linker can't detect such a usage. Thus, the linker will remove this code, even though it is used. This will lead to problems when the application actually runs.

引用的Akavache.doc文件暗示Akavache.Sqlite3是其中一种情况,其中Xamarin链接器将无法告知其正在被使用,因此链接器将错误地将其删除.文档建议您添加引用,以防止Xamarin链接程序删除Akavache.Sqlite3-即,防止Xamarin将链接库链接"到您的应用程序.

The quoted Akavache docs imply that Akavache.Sqlite3 is one of these cases, where the Xamarin linker will not be able to tell that it is being used, and thus the linker will remove it incorrectly. The docs recommend you add a reference to prevent the Xamarin linker from removing Akavache.Sqlite3 - i.e., to prevent the library from being "linked out" of your application by Xamarin.

这篇关于“被Xamarin链接"的内容是什么?意思是?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆