c# - No method found in project.filename in Xamarin android -
i have button login on loginpage.xaml , btnloginclicked method in code behind in xamarin.forms project. code below- xaml :
<stacklayout spacing="20" padding="20" verticaloptions="center"> <activityindicator x:name="activityindicator" color="white" isrunning="false" isvisible="false"/> <entry x:name="entryusername" textcolor="{x:static color:colorresources.entrytextcolor}" placeholder="firstname.lastname" placeholdercolor="gray" ispassword="false" backgroundcolor="{x:static color:colorresources.entrybackgroundcolor}" /> <entry x:name="entrypassword" textcolor="{x:static color:colorresources.entrytextcolor}" placeholder="password" placeholdercolor="gray" ispassword="true" backgroundcolor="{x:static color:colorresources.entrybackgroundcolor}" /> <button x:name="btnlogin" textcolor="{x:static color:colorresources.btntextcolor}" text="login" clicked="btnloginclicked" backgroundcolor="{x:static color:colorresources.commonbuttonbackgroundcolor}"/> <label x:name="linkforgotpassword" horizontaloptions="end" text="forgot password?" textcolor="#0b0ff6"/> </stacklayout>
code behind :
async public void btnloginclicked(object sender, eventargs e){ //my stuffs }
when test application on ios simulator fine in case of android gives me error "no method found btnloginclicked" in loginpage. why so?
try clean project , rebuild project. , deploy let me know if solve problem.
Comments
Post a Comment