No Activity found to handle Intent

后端 未结 6 1404
攒了一身酷
攒了一身酷 2020-12-01 17:35

i am attempting to launch an intent to open a link to the android market.

android manifest portion looks like this:



        
6条回答
  •  無奈伤痛
    2020-12-01 18:12

    You are running this code on an Android environment that lacks the Google Play Store, such as an emulator, Kindle Fire, etc.

    If you are encountering this on an emulator, test this code path on a device that has the Play Store.

    If you are encountering this on some piece of hardware that lacks the Play Store, or if you are planning on distributing your app to devices that lack the Play Store, either handle the exception or use PackageManager and resolveActivity() to determine if your Intent will succeed before calling startActivity().

    if(intent.resolveActivity(getPackageManager()) != null)
        startActivityForResult(intent, 0);
    else
        ...
    

提交回复
热议问题