Problem description
This exception occurs when the name of the specified package, app, or component is not found.
Solution
This exception occurs when the name of the specified package, app, or component is not found. You must check the name of the dependent package, app, or component.
Sample code
public static void startEmailIntent(Context context, String emailAddress) {
try {
Resources res = context.getPackageManager().
getResourcesForApplication("com.android.launcher");
res.getDisplayMetrics();
} catch (NameNotFoundException e) {
e.printStackTrace();
}
}