Android: No Activity found to handle Intent error? How it will resolve

Ahmad Arslan picture Ahmad Arslan · Feb 6, 2012 · Viewed 106.2k times · Source

No Activity found to handle Intent error? How it will resolve.

Preference customPref = (Preference) findPreference("DataEntryScreen"); 
   customPref
        .setOnPreferenceClickListener(new OnPreferenceClickListener() {
         public boolean onPreferenceClick(Preference preference) {                  

        Intent i = new Intent("com.scytec.datamobile.vd.gui.android.AppPreferenceActivity");
                 startActivity(i);
                  return true;                                        
               }
           });

Answer

Karthik picture Karthik · Feb 6, 2012

Add the below to your manifest:

  <activity   android:name=".AppPreferenceActivity" android:label="@string/app_name">  
     <intent-filter> 
       <action android:name="com.scytec.datamobile.vd.gui.android.AppPreferenceActivity" />  
       <category android:name="android.intent.category.DEFAULT" />  
     </intent-filter>   
  </activity>