Below line is causing problem for you
tv.findViewById(R.id.textView1);//here tv is null
Change this line to
tv = (TextView) findViewById(R.id.textView1);
solved TextView with a long text [closed]
Below line is causing problem for you
tv.findViewById(R.id.textView1);//here tv is null
Change this line to
tv = (TextView) findViewById(R.id.textView1);
solved TextView with a long text [closed]