Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Android.Content.ActivityNotFoundException: Unable to find explicit activity class

$
0
0

Good Day Everyone

From my AppCompatActivity class i am trying to open an activity as an intent like this

                    Intent homemap = new Intent(this, typeof(HomeMap));
                        var  fintent = new Intent(this, homemap.Class);
                        StartActivity(fintent);

and my manifest i have declared my Activity like this

    <activity
            android:name=".Toletsa.HomeMap"
            android:label="@string/title_activity_maps" />

and my package name in the manifest is package="com.vimalsoft.toletsa" . My assembly name is Toletsa and my namespace is Toletsa

The layout file for my Activity that i want to open as an intent is

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_privacy_policy"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.vimalsoft.toletsa.Toletsa.HomeMap">
  <fragment
      android:id="@+id/map"
      android:layout_width="200dp"
      android:layout_height="200dp"
      class="com.google.android.gms.maps.MapFragment" />
</RelativeLayout>

when i run the project i get an error when starting the activity

Unhandled Exception:
Android.Content.ActivityNotFoundException: Unable to find explicit activity class {com.vimalsoft.toletsa/android.content.Intent}; have you declared this activity in your AndroidManifest.xml?

Thanks


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>