It should be a simple job as always. I have been just getting data from my api call and want to populate it in recyclerview. I have done this like thousand times as everyone does I guess. But here I am getting null pointer exception when view item layout is inflating in adapter class.I have no idea how to solve it.
My adapter class is
public class RecipeAdapter extends RecyclerView.Adapter<RecipeAdapter.ViewHolder> {
private List<RecipeByIngredients> recipeByIngredients;
private Context mContext;
public RecipeAdapter(List<RecipeByIngredients> recipeByIngredients, Context mContext) {
    this.recipeByIngredients = recipeByIngredients;
    this.mContext = mContext;
}
@Override
public RecipeAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    final LayoutInflater mInflater = LayoutInflater.from(parent.getContext());
    final View itemView = mInflater.inflate(R.layout.recipe_item_layout, parent, false);
    return new ViewHolder(itemView);
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
    RecipeByIngredients recipeByIngredient = recipeByIngredients.get(position);
    holder.tvUsedIngredients.setText(recipeByIngredient.getUsedIngredientCount() + " " + "ingredients used");
    holder.tvMissedIngredients.setText(recipeByIngredient.getMissedIngredientCount() + " " + "missed ingredients");
    Glide.with(mContext)
            .load(recipeByIngredient.getImage())
            .placeholder(R.drawable.recipe_placeholder)
            .error(R.drawable.recipe_placeholder)
            .into(holder.mainRecipePhoto);
}
@Override
public int getItemCount() {
    return recipeByIngredients.size();
}
public static class ViewHolder extends RecyclerView.ViewHolder{
    public ImageView mainRecipePhoto;
    public TextView tvUsedIngredients;
    public TextView tvMissedIngredients;
    public ViewHolder(View itemView) {
        super(itemView);
        mainRecipePhoto = (ImageView) itemView.findViewById(R.id.ivRecipe);
        tvMissedIngredients = (TextView) itemView.findViewById(R.id.tvMissedIngredients);
        tvUsedIngredients = (TextView) itemView.findViewById(R.id.tvUsedIngredients);
    }
 }
}
Item layout xml is
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:autofit="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="200dp">
<ImageView
    android:id="@+id/ivRecipe"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:alpha="50"
    android:scaleType="centerCrop" />
<me.grantland.widget.AutofitTextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center_vertical|center_horizontal"
    android:padding="8dp"
    android:text="Recipe name"
    android:textAllCaps="false"
    android:textColor="#FFFFFF"
    android:textSize="@dimen/text_size_large"
    autofit:minTextSize="10sp" />
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    android:orientation="horizontal"
    android:weightSum="2">
    <me.grantland.widget.AutofitTextView
        android:id="@+id/tvUsedIngredients"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:gravity="center"
        android:padding="8dp"
        android:text="5 ingredients used"
        android:textAllCaps="false"
        android:textColor="#b7b7b7"
        android:textSize="@dimen/text_size_small"
        android:textStyle="bold|italic"
        autofit:minTextSize="8sp" />
    <view
        android:layout_width="0.5dp"
        android:layout_height="20dp"
        android:layout_gravity="center_vertical|center_horizontal"
        android:background="#ffffff" />
    <me.grantland.widget.AutofitTextView
        android:id="@+id/tvMissedIngredients"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:gravity="center"
        android:padding="8dp"
        android:text="3 ingredients missed"
        android:textAllCaps="false"
        android:textColor="#b7b7b7"
        android:textSize="@dimen/text_size_small"
        android:textStyle="bold|italic"
        autofit:minTextSize="8sp" />
</LinearLayout>
</FrameLayout>
Error I am getting
java.lang.NullPointerException: Attempt to invoke virtual method 
'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
                                                                            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:715)
                                                                            at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
                                                                            at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
                                                                            at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
                                                                            at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
                                                                            at projects.startup.foodmaker.appModules.ingredientSearch.RecipeAdapter.onCreateViewHolder(RecipeAdapter.java:36)
                                                                            at projects.startup.foodmaker.appModules.ingredientSearch.RecipeAdapter.onCreateViewHolder(RecipeAdapter.java:22)
                                                                            at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6290)
                                                                            at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5478)
                                                                            at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5363)
                                                                            at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5359)
                                                                            at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2141)
                                                                            at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1525)
                                                                            at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1488)
                                                                            at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:585)
                                                                            at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3506)
                                                                            at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3254)
                                                                            at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3767)
                                                                            at android.view.View.layout(View.java:15596)
                                                                            at android.view.ViewGroup.layout(ViewGroup.java:4966)
                                                                            at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1076)
                                                                            at android.view.View.layout(View.java:15596)
                                                                            at android.view.ViewGroup.layout(ViewGroup.java:4966)
                                                                            at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
                                                                            at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
                                                                            at android.view.View.layout(View.java:15596)
                                                                            at android.view.ViewGroup.layout(ViewGroup.java:4966)
                                                                            at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
                                                                            at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
                                                                            at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
                                                                            at android.view.View.layout(View.java:15596)
                                                                            at android.view.ViewGroup.layout(ViewGroup.java:4966)
                                                                            at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
                                                                            at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
                                                                            at android.view.View.layout(View.java:15596)
                                                                            at android.view.ViewGroup.layout(ViewGroup.java:4966)
                                                                            at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
                                                                            at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
                                                                            at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
                                                                            at android.view.View.layout(View.java:15596)
 
     
     
    