Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ActivityNotFoundException: No Activity found to handle Intent

This report I recive from google play, my app crash on :

  android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.google.android.gms.common.account.CHOOSE_ACCOUNT (has extras) }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1518)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1390)
at android.app.Activity.startActivityForResult(Activity.java:3204)
at com.example.uploadvideo.MainUploadToYoutube.authenticate(MainUploadToYoutube.java:287)
at com.example.uploadvideo.MainUploadToYoutube.onOptionsItemSelected(MainUploadToYoutube.java:211)
at android.app.Activity.onMenuItemSelected(Activity.java:2516)
at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:965)
at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:149)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:468)
at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:126)
at android.view.View$PerformClick.run(View.java:14155)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4508)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
at dalvik.system.NativeStart.main(Native Method)

in com.example.uploadvideo.MainUploadToYoutube I have this methood :

public void authenticate() {
    Intent accountChooserIntent =
        AccountPicker.newChooseAccountIntent(null, null,
            new String[] {GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE}, true, "Select an account", null,
            null, null);
    startActivityForResult(accountChooserIntent, REQUEST_PICK_ACCOUNT);
  }



 case REQUEST_PICK_ACCOUNT:
        if (resultCode == RESULT_OK) {
          mChosenAccountName = data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME);
          tryAuthenticate();
        }

I find these similar posts , How to solve “No Activity found to handle Intent” error

from these post I understand that I need to rewrite the intent and add activity to the manifest am I right ???

like image 739
idan Avatar asked Jul 04 '13 21:07

idan


1 Answers

As you are using a Google Play Services component (the AccountPicker), you need to ensure that Google Play Services exists and is up to date on the users device before calling methods that use the service as explained in the setup guide.

like image 101
ianhanniballake Avatar answered Oct 05 '22 15:10

ianhanniballake