问题描述
嗨我是android的初学者
我已经制作了一个文件(list_mushic.xml),并且在scrollview中添加了tablelayout,并且以这种方式获得了(TableLayout table _ =(TableLayout)findViewById(R.id.song_table)),并且在运行时放置了一些textview和图像当我单击以显示结果但显示以下错误时,任何人都可以帮助我.
无法启动活动ComponentInfo {com.sample.activityswitching1/com.sample.activityswitching1.Page2}:java.lang.NullPointerException
Hii am beginner to android
i have made a file (list_mushic.xml) and i have add tablelayout in scrollview and i have get(TableLayout table_=(TableLayout) findViewById(R.id.song_table) in this way and i am adding some textview and images on runtime put when i click on to show result but it is showing me following error can any one help me please.
Unable to start activity ComponentInfo{com.sample.activityswitching1/com.sample.activityswitching1.Page2}: java.lang.NullPointerException
推荐答案
这篇关于在Tablelayout中的运行时添加控件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!