andorid studio 编译无法通过
以下为源码
package com.example.administrator.myapplication ; import android.content.Context ; import android.support.v7.app.ActionBarActivity ; import android.os.Bundle ; import android.support.v7.widget.LinearLayoutManager ; import android.support.v7.widget.RecyclerView ; import android.view.LayoutInflater ; import android.view.View ; import android.view.ViewGroup ; import android.widget.SimpleAdapter ; import android.widget.TextView ; import java.util.ArrayList ; import java.util.List ; public class MainActivity extends ActionBarActivity{ private RecyclerView mRecyclerView1 ; private List<String> mDatas ; private SimpleAdapter mAdapter ; @Override protected void onCreate (Bundle savedInstanceState) { super .onCreate(savedInstanceState) ; setContentView(R.layout. activity_main ) ; initDatas1() ; initViews1() ; mAdapter = new SimpieAdapter(getApplicationContext() , mDatas ) ; mRecyclerView1 .setAdapter( mAdapter ) ; LinearLayoutManager linearLayoutManager= new LinearLayoutManager( this, LinearLayoutManager. VERTICAL ,false ) ; mRecyclerView1 .setLayoutManager(linearLayoutManager) ; } private void initViews1 () { mRecyclerView1 = (RecyclerView) findViewById(R.id. id_recyclerView1 ) ; } private void initDatas1 () { mDatas = new ArrayList<String>() ; /* for (int i='A'; i<='Z';i++){ mDatas.add(""+(char)i); } */ mDatas .add( "A" ) ; } /** * Created by Administrator on 2015/6/25. */ public static class SimpieAdapter extends RecyclerView.Adapter<MyviewHolder1> { private LayoutInflater mInflater ; private Context mContxt ; private List<String> mDatas ; public SimpieAdapter(Context context , List<String> datas){ this . mContxt = context ; this . mDatas = datas ; mInflater = LayoutInflater. from (context) ; } @Override // 创建 ViewHolder public MyviewHolder1 onCreateViewHolder (ViewGroup viewGroup , int i) { View view1= mInflater .inflate(R.layout. item_single , viewGroup ,false ) ; MyviewHolder1 myviewHolder1= new MyviewHolder1(view1) ; return myviewHolder1 ; } @Override // 绑定 ViewHolder public void onBindViewHolder (MyviewHolder1 myviewHolder1 , int i) { myviewHolder1. tv .setText( mDatas .get(i)) ; } @Override public int getItemCount () { return mDatas .size() ; } } static class MyviewHolder1 extends RecyclerView.ViewHolder{ TextView tv ; public MyviewHolder1(View itemView) { super (itemView) ; tv = (TextView) itemView.findViewById(R.id. id_tv ) ; // 有其他属性可以在此初始化 } } }