0
上的錯誤低於線拋出充氣例外插件recycleview
setContentView(R.layout.activity_main);
android.view.InflateException:二進制XML文件行#9:錯誤充氣類android.support.v7.app.widget.RecycleView
我錯過了什麼?
代碼
MainActivity.java
package com.example.xxx.yyyy;
import android.database.sqlite.SQLiteException;
//import android.support.v7.app.AlertController;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
public class MainActivity extends AppCompatActivity {
private final static String TAG = "MainActivity";
DBHandler dbHandler = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
activity_main.xml中
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.app.widget.RecycleView
android:id="@+id/esp_menu"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.app.widget.RecycleView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />