0
錯誤升級MvvmCross從5.1到5.2之後,我CustomAndroidPresenter.cs拋出生成錯誤。這是什麼造成的?升級MvvmCross至5.2顯示了CustomAndroidPresenter
CustomAndroidPresenter.cs:
namespace TestPrjDroid
{
public class CustomAndroidPresenter : MvxAndroidViewPresenter
{
public override void Show(MvxViewModelRequest request)
{
if (request != null && request.PresentationValues != null)
{
if (request.PresentationValues.ContainsKey("MyCustomFlag"))
{
// Get intent from request and set flags to clear backstack.
var intent = base.CreateIntentForRequest(request);
intent.AddFlags(ActivityFlags.ClearTask | ActivityFlags.ClearTop | ActivityFlags.NewTask);
base.Show(intent);
return;
}
}
base.Show(request);
}
}
}
錯誤:
There is no argument given that corresponds to the required formal parameter 'androidViewAssemblies' of 'MvxAndroidViewPresenter.MvxAndroidViewPresenter(IEnumerable)'
Argument 1: cannot convert from 'Android.Content.Intent' to 'MvvmCross.Core.ViewModels.MvxViewModelRequest'
它拋出: 錯誤CS0246:'類型或命名空間名稱「大會」不能found' –
@Mukte Swar Patnaik,嘗試使用'System.Reflection.Assembly'。 –
@ YorkShen-MSFT 我試過太多,它會引發以下錯誤。 錯誤CS7036'沒有給定的參數對應於所要求的形式參數「androidViewAssemblies」「CustomAndroidPresenter.CustomAndroidPresenter(IEnumerable的)」' 錯誤CS1503'參數1:不能從「Android.Content.Intent」轉換到「MvvmCross.Core.ViewModels.MvxViewModelRequest'' –