我刚刚更新到 Mono 4.4.41,并且收到与包含 android-support-v4.jar 文件相关的编译错误。我收到的编译错误:
You have Jar libraries, android-support-v4.jar, that have the identical name with inconsistent file contents. Please make sure to remove any conflicting libraries in EmbeddedJar, InputJar and AndroidJavaLibrary.
错误发生在 Novell.MonoDroid.Common.targets(MonoDroid 的一部分,不是我的项目的一部分)的第 344 行,它在其中检查重复的 jar 文件。
在上次更新之前,我已经使用支持库数周了,没有出现任何问题。我按照以下说明将其添加到我的项目中: http://docs.xamarin.com/Android/Guides/Platform_Features/Fragments/Part_4_-_Providing_Backwards_Compatibility_with_the_Android_Support_Package
最佳答案
从项目中删除支持库 jar 可以解决此问题。看来 Android 版 Mono 现在会自动将支持库绑定(bind)到构建中,这会导致构建中出现重复的 jar 文件。我浏览了最近的发行说明,这是我能找到的所有听起来相关的内容:
"Binding Projects now embed the bound .jar into the binding assembly."
来自: http://docs.xamarin.com/android/releases/Mono_For_Android_4/Mono_for_Android_4.2.8
关于android - MonoForAndroid : android-support-v4. jar编译问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13850409/