這裏建立我的項目在釋放模式是個例外,我得到當我嘗試在釋放模式運行:不能與聯
4> C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1124,3): error MSB4018: The "BuildApk" task failed unexpectedly.
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1124,3): error MSB4018: System.ArgumentException: An item with the same key has already been added.
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1124,3): error MSB4018: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1124,3): error MSB4018: at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1124,3): error MSB4018: at Ionic.Zip.ZipFile._InternalAddEntry(ZipEntry ze)
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1124,3): error MSB4018: at Ionic.Zip.ZipFile.AddFile(String fileName, String directoryPathInArchive)
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1124,3): error MSB4018: at Xamarin.Android.Tasks.BuildApk.AddAssemblies(ZipFile apk)
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1124,3): error MSB4018: at Xamarin.Android.Tasks.BuildApk.Execute()
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1124,3): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1124,3): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
任何人有我怎樣才能解決這個問題有什麼建議?
我檢查了我的項目文件,我找不到任何重複的文件名。雖然在調試模式下一切正常,但真的很奇怪。只有當我將dotnetzip作爲參考添加並啓用鏈接時纔會發生。如果我刪除dotnetzip並鏈接它的作品。如果我禁用鏈接並將dotnetzip作爲參考,它可以工作。 – Roosevelt
這是「Mono for Android」還是beta版的穩定版本? – Bryan