我的app运行停止是为什么???没代码错误
package com.example.pingtu;
import android.os.Bundle;
import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.view.Menu;
import android.widget.GridLayout;
import android.widget.ImageView;
public class MainActivity extends Activity {
private ImageView[][] iv_game_arr = new ImageView[3][5];
private GridLayout g_main_game;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Bitmap bigBm =((BitmapDrawable)getResources().getDrawable(R.drawable.img)).getBitmap();
int tuWandH=bigBm.getWidth() / 5;
for (int i = 0;i<iv_game_arr.length;i++){
for(int j = 0; j<iv_game_arr[0].length;j++){
Bitmap bm = Bitmap.createBitmap(bigBm,j* tuWandH, i*tuWandH,tuWandH,tuWandH);
iv_game_arr[i][j]=new ImageView(this);
iv_game_arr[i][j].setImageBitmap(bm);
iv_game_arr[i][j].setPadding(2,2,2,2);
}
}
g_main_game= (GridLayout) findViewById(R.id.g_main_game);
for (int i = 0;i<iv_game_arr.length;i++){
for(int j = 0; j<iv_game_arr[0].length;j++){
g_main_game.addView(iv_game_arr[i][j]);
}
}
setNullImageView(iv_game_arr[2][4]);
}
public void setNullImageView(ImageView mImageView){
mImageView.setImageBitmap(null);
}
}