Unable to find explicit activity class have you declared this activity

VuyiswaMasekoVuyiswaMaseko ✭✭USMember ✭✭

Good Day All

i have a line of code

MainActivity.Instance.StartActivityForResult(pr.ToIntent(Android.App.Application.Context), REQUEST_CODE);

and my manifest is defined like this

    <application>
  <!-- Declare these objects, this is part of Fortumo's Android SDK, and should not be called directly -->
  <receiver android:name="Mp.MpSMSReceiver">
    <intent-filter>
      <action android:name="android.provider.Telephony.SMS_RECEIVED" />
    </intent-filter>
  </receiver>
  <service android:name="Mp.MpService" />
  <service android:name="Mp.StatusUpdateService" />
  <activity android:name="Mp.MpActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="orientation|keyboardHidden|screenSize" /> 
  </application>

and when i run my project on the above line i get this error

{Android.Content.ActivityNotFoundException: Unable to find explicit activity class {InApp.Droid/mp.MpActivity}; have you declared this activity in your AndroidManifest.xml?
at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00089] in < >:0
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0005d] in < >:0
at Android.App.Activity.StartActivityForResult (Android.Content.Intent intent, System.Int32 requestCode) [ ] in /Users/builder/jenkins/workspace/xamarin-android-commercial/xamarin-android/src/Mono.Android/obj/Release/android-28/mcw/Android.App.Activity.cs:6199
at InApp.Droid.Services.FortumoInAppService.PurchaseProduct (System.String productId) [ ] in C:\FortumoInApp-master\FortumoInApp-master\FortumoInApp.Droid\Services\FortumoInappService.cs:165
--- End of managed Android.Content.ActivityNotFoundException stack trace ---
android.content.ActivityNotFoundException: Unable to find explicit activity class {InApp.Droid/mp.MpActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1812)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1525)
at android.app.Activity.startActivityForResult(Activity.java:4398)
at android.app.Activity.startActivityForResult(Activity.java:4356)
at .ButtonRenderer_ButtonClickListener.n_onClick(Native Method)
at .ButtonRenderer_ButtonClickListener.onClick(ButtonRenderer_ButtonClickListener.java:30)
at android.view.View.performClick(View.java:5647)
at android.view.View$PerformClick.run(View.java:22465)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6238)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
}

Thanks

Best Answer

  • VuyiswaMasekoVuyiswaMaseko ✭✭ US ✭✭
    Accepted Answer

    My Mistake is that the Package name was not defined . after i added it , it all started to work

    Thanks

Answers

  • VuyiswaMasekoVuyiswaMaseko ✭✭ USMember ✭✭
    Accepted Answer

    My Mistake is that the Package name was not defined . after i added it , it all started to work

    Thanks

Sign In or Register to comment.