Error in my class

google classroom oops there was an error
culture of error in the classroom
using mistakes as learning opportunities
learning through mistakes theory
mistakes and learning
google classroom there was an error please try again
benefits of learning from mistakes
error is not a class, namespace, or enumeration

I don't know why I'm getting this exception. In my chat App whenever I try to send message, my app crash.

See the error in Logcat below:

 android.view.InflateException: Binary XML file line #17: Binary XML file line #17: Error inflating class TextView
    at android.view.LayoutInflater.inflate(LayoutInflater.java:551)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
    at com.jimmytrivedi.lapitchat.MessageAdapter.onCreateViewHolder(MessageAdapter.java:25)
    at com.jimmytrivedi.lapitchat.MessageAdapter.onCreateViewHolder(MessageAdapter.java:14)
    at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6685)
    at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5869)
    at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5752)

Below is my MessageAdapter.java class where I'm getting this error in this line:

View view = LayoutInflater.from(parent.getContext()).inflate(
            R.layout.message_single_layout, parent, false);

package com.jimmytrivedi.lapitchat;

import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import java.util.List;

import de.hdodenhof.circleimageview.CircleImageView;

public class MessageAdapter extends RecyclerView.Adapter<MessageAdapter.MessageViewHolder> {

    private List<Messages> messagesList;

    public MessageAdapter(List<Messages> messagesList) {
        this.messagesList = messagesList;
    }

    @NonNull
    @Override
    public MessageViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext()).inflate(
                R.layout.message_single_layout, parent, false);

        return new MessageViewHolder(view);
    }

    @Override
    public void onBindViewHolder(@NonNull MessageViewHolder holder, int position) {
        Messages messages = messagesList.get(position);
        holder.chatText.setText(messages.getMessage());
    }

    @Override
    public int getItemCount() {
        return messagesList.size();
    }

  public class MessageViewHolder extends RecyclerView.ViewHolder {

        public TextView chatText;
        public CircleImageView chatImage;

        public MessageViewHolder(View itemView) {
            super(itemView);
            chatText = itemView.findViewById(R.id.chatText);
            chatImage = itemView.findViewById(R.id.changeImage);
        }

    }

}

message_single_layout

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/MessageSingleLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <de.hdodenhof.circleimageview.CircleImageView
        android:id="@+id/chatImage"
        android:layout_width="38dp"
        android:layout_height="38dp"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:layout_marginStart="45dp"
        android:layout_marginTop="42dp"
        android:src="@drawable/defaultimage" />

    <TextView
        android:id="@+id/chatText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:layout_marginStart="98dp"
        android:layout_marginTop="49dp"
        android:textSize="20dp"
        android:background="@drawable/message_text_background"
        android:text="Hello" />

</RelativeLayout>

Is (android:background="@drawable/message_text_background") cause the problem? This is in my drawable 24 directory with root element of shape.

In video, the guy made drawable directory and in drawable directory he made the new drawable file. But in my case I'm using latest version so drawable directory is also exist and when I click on drawable there is no option to create new drawable file, so I did in drawable 24.

i think message_text_background is the problem.

remove below line and check

android:background="@drawable/message_text_background"

your drawable not exist in that version

go to your app directory app/src/main/res and create drawable folder and paste your message_text_background in to it

The Treatment Of Errors In The Classroom English Language Essay, What are the main reasons for and against correcting students mistakes? One of the most common errors is the following: “Class Not Registered”. In this article, we will not only show you how to it this error but also, by the end of this article, you should be able to really understand the error.

"my end message_text_background is in drawable 24"

your mobile SDK version is 24 or not.

if not then change text background

Dealing with Errors in the Classroom, How you might correct some examples of student language errors? In case you are trying to run it using command window I don't think a '.class' file is required for compiling rather it would be required for execution. So after you have a .class file by entering javac GoodEmployee and you have no errors enter java GoodEmployee which will execute the .class file you have.

Please make another background XML file and save them in the lowest version as shown in attached pic. If you have again doubt please let me know I will again clarify you.

template and derived class definition : error: 'myClass' is not a class , It's important to know how to deal with errors when they happen in the classroom to create an effective learning environment, instead of  — before its use in class X or be a member of a base class of X (10.2), or — if X is a nested class of class Y (9.7), before the definition of X in Y, or shall be a member of a base class of Y (this lookup applies in turn to Y’s enclosing classes, starting with the innermost enclosing class),28) or

Why am I getting an error message when I submit my assignment , You need to specify the template parameter for it, since myClass is a class template. template<typename T> myClass<T>::myClass(void) : std::stack<T>() { // ^^^ }. This prints out a nice stacktrace which provides a hint to what the message Could not find or load main class message means. For instance, it can point you to other classes used by the main class that could not be found and prevented the main class to be loaded.

Troubleshoot domain errors - Classroom Help, Gives an error message stating "There was an error turning in your assignment. Please try again. DISMISS". Nearly everyone in the class is  Gwinnett County Public Schools, located in the metro Atlanta area, is the largest school system in Georgia and continues to grow. As a school system of choice, the finest teachers, involved parents, and a supportive community are key elements in the district's quest to become a system of world-class schools.

9 Powerful Ways to Correct your Student's Mistakes Without , Please make sure you entered the correct code. A student in an untrusted domain can't use a code to join a class in the school domain. Check your Classroom and  Update: you can show message boxes with only CSS instead of using the i icon HTML element. Both ways are explained here. ( Skip down to the pure CSS solution.) These message notification boxes use font icons instead of image icons in order to increase page speed. You can also use message boxes without icons. The style of these message boxes is

Comments
  • The problem is in the xml file, as the log says
  • #17: Error inflating class TextView issue is in layout file line 17 share your layout with question
  • please post xml code?
  • Can you post the layout for message_single_layout.xml?
  • @JimmyTrivedi why don't you try it and see it for yourself? remove the line and see if it works.
  • In video, the guy made drawable directory and in drawable directory he made the new drawable file. But in my case I'm using latest version so drawable directory is also exist and when I click on drawable there is no option to create new drawable file, so I did in drawable 24.
  • that is your problem. you can go to your app directory app/src/main/res and create drawable folder
  • then copy message_text_background to this directory
  • if problem steel there send message_text_background code
  • yes that message_text_background is the problem but what is solution? drawable is already exist in latest version of AS. and my end message_text_background is in drawable 24.
  • How to know? I'm using 6.0.1 API level 23
  • I have sent a pic with answer
  • I already did that. Thanks again and can you help me for one more problem? Check here (stackoverflow.com/questions/51288664/…)
  • I will get back to you soon with answer
  • Thanks, I'll wait