Error starting an Activity

ErikaBErikaB MXMember ✭✭

Hii!

When I try

var m_activity = Intent(this, typeof(DataPage));
this.StartActivity(m_activity);

it gives me an error:

Java.Lang.ClassNotFoundException: md5d4e5006a67f487437a8012c63ad37986.ActivityName

Do you know what it can be?? Please helpme :(

Answers

  • RofiqSetiawanRofiqSetiawan USMember ✭✭✭

    Hi @ErikaB
    Make sure Activity attribute already added to your DataPage activity.
    For example:

    [Activity(Label = "@string/app_name", MainLauncher = true)]
    public class DataActivity : AppCompatActivity
    {
        // ...
    }
    
  • DimChrisDimChris USMember ✭✭✭

    First Question are you using intent for passing data into another activity?
    Otherwise you can use

    StartActivity(typeof(m_activity))
    

    Does this work?

  • ErikaBErikaB MXMember ✭✭

    DimChris> @DimChris said:

    First Question are you using intent for passing data into another activity?
    Otherwise you can use

    StartActivity(typeof(m_activity))
    

    Does this work?

    No, I've tried that a lot of times but I get the same error :(

  • DimChrisDimChris USMember ✭✭✭

    Can you post something from your code: what are you trying to do? Do you have latest xamarin version? Which visualStudio do you use?

  • JonDouglasJonDouglas USXamarin Team, University, Developer Group Leader Xamurai

    We are tracking this issue here:

    https://bugzilla.xamarin.com/show_bug.cgi?id=61073

Sign In or Register to comment.