腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
findViewById
返回
null
、
、
它在我运行4.1的手机上运行得很好,但是当我试图在运行2.3的模拟器上运行我的代码时,mContent = (FrameLayout)
findViewById
(R.id.animation_layout_content);这一行总是
返回
null
;然而,mSidebar正确地
返回
了视图。=
null
?getSupportFragmentManager().findFragmentByTag("single_pane"); mLayout = (Animation
浏览 1
提问于2012-09-25
得票数 1
1
回答
findViewById
()
返回
null
、
、
最常引用的解决方案是确保setContentView()在
findViewByID
()之前被调用。我根本没有调用setContentView(),因为我没有指定的布局。redCheckBox = (CheckBox)
findViewById
(R.id.redCheckBox); // returns
null
getFragmentManager().beginTransaction
浏览 2
提问于2013-05-20
得票数 0
回答已采纳
4
回答
findViewById
返回
null
buttonOkListener = new OnClickListener() { EditText editText = (EditText)
findViewById
buttonCancelListener = new OnClickListener() { EditText editText = (EditText)
findViewById
ToDo add your GUI initiali
浏览 0
提问于2011-05-09
得票数 6
1
回答
findViewById
返回
null
我在使用
findViewById
时遇到了问题。它
返回
null
。我正在创建一个游戏,我有一个活动,这是我的菜单。从那里我创建并启动了我的SurfaceView。但我无法使用TextView获得对FPS
findViewById
的引用。; private TextView mFPSTextView =
null
; privateIS RETURNING
NULL</em
浏览 0
提问于2013-12-20
得票数 0
回答已采纳
3
回答
FindViewById
返回
null
、
、
base.OnCreate(bundle); this.
FindViewById
<Button>(Resource.Id.BackButton
浏览 1
提问于2014-08-08
得票数 8
1
回答
.
findViewById
()
返回
null
、
、
我使用了调试器,似乎root.
findViewById
(R.id.physicalEffortSwitch)
返回
null
。只是没有任何意义..。有人吗?这将是我的XML: } Switch physicalEffortSwitch = (Switch) this.root.
findViewById
浏览 1
提问于2020-05-13
得票数 0
回答已采纳
2
回答
findViewById
返回
null
、
、
、
GravityFragment)fragmentManager.findFragmentById(R.id.mainContainerLayout); if (gravityFragment ==
null
click listener
浏览 2
提问于2013-08-01
得票数 1
1
回答
LstView
findViewByID
返回
null
、
我在XML中定义了几个对象,当我尝试获取它们的句柄时,它们
返回
null
。我看到几个帖子说要清理这个项目,但这并没有帮助。当我浏览ListView对象时,所有子对象都是空的??lstvw_LiftData = (ListView)
findViewById
(R.id.lstvw_LiftData); Button btn_Nxt = (Button)this.
findViewById
(R.id.btn_NextL
浏览 0
提问于2012-11-15
得票数 0
回答已采纳
2
回答
返回
null
的
findViewById
、
、
但是,当我在Activity中调用
findViewById
来查找R.id.singleCalendar1时,它
返回
null
。 我尝试过清理和更新,但都无济于事。我想过用LayoutInflater.from(this).inflate(R.id.calendar_layout,
null
)扩展视图,找到它的孩子,然后找到singleCalendar1 ID……
浏览 0
提问于2012-10-16
得票数 0
回答已采纳
1
回答
Android,
findViewById
返回
null
、
、
我正在为安卓编写一些代码,问题是,当我调用
findViewById
时,它会
返回
null
,我不明白为什么!从昨天开始,我一直在浪费脑筋,但我还是想不出解决办法。目标是将布局设置为listView的标题。getChildFragmentManager(), "dialog"); if (fragmentManager ==
null
commit(); private void make_test(View v, ViewGr
浏览 0
提问于2013-06-29
得票数 2
回答已采纳
2
回答
(FrameLayout)
findViewById
-
返回
null
?
、
、
为什么我总是(FrameLayout)
findViewById
总是
返回
null
?文件存在。与谷歌地图合作。我读过相关的话题。动力:项目-清洁。删除文件夹根。super.onCreate(savedInstanceState); mapView = (MapView)
findViewById
(R.id.travelMapView); FrameLayout mainLayout = (FrameLayou
浏览 2
提问于2012-12-27
得票数 0
2
回答
AdMob
findViewById
返回
null
当我尝试运行应用程序时,
findViewByID
总是
返回
null
。//R.id.main has value, I can see it in Eclipse Log.d("Error","Layout is
null</e
浏览 1
提问于2013-03-20
得票数 2
4
回答
ListView
findViewById
返回
null
、
、
相反,我尝试使用:不幸的是,lv为空。编辑:我试图在调用setContentView之前调用
findViewById
。首先调用setContentView解决了这个问题。
浏览 0
提问于2012-09-18
得票数 3
回答已采纳
2
回答
Android:
findViewById
返回
null
、
、
LayoutParams.FILL_PARENT)); Button back = (Button)
findViewById
(R.id.button_back);但是
findViewById
返
浏览 0
提问于2013-07-09
得票数 0
回答已采纳
1
回答
findViewByID
突然
返回
null
、
但是,我现在不能让它工作,因为
findViewByID
无缘无故地
返回
null
public void onCreatesuper.onCreate(savedInstanceState); if(mapView ==
浏览 4
提问于2011-11-26
得票数 1
回答已采纳
1
回答
ListView -
findviewbyid
返回
null
、
PendingInvoiceAdapter(this, R.layout.pending_invoice_row, invoices); ListView listView = (ListView)
findViewById
浏览 0
提问于2015-12-27
得票数 0
1
回答
Robolectric:
findViewById
返回
null
、
、
这与Robolectric网站中的示例非常相似,但
findViewById
一直
返回
null
。 mActivity = new SignInActivity(); public void shouldHaveTheCorrectLogo() throws Exception { assertNotNull(mActivity.
浏览 0
提问于2012-10-30
得票数 1
1
回答
FindViewById
返回
null
(ProgressBar)
、
、
、
我得到这个错误的代码的一部分: Log.d(TAG, "img
null
"); Log.d(TAG, "img not
null
"
浏览 0
提问于2013-04-02
得票数 0
3
回答
FindViewById
是否
返回
null
?
但是,当我尝试在java代码中查找列表视图时,
findViewById
函数
返回
null
。</LinearLayout> 下面是令人不快的代码: ListView lstAppts = (ListView)
findViewById
它在我的XML中被命名为'lstAppts‘,在
findViewById
函数中,我使用R.id.lstAppts找到了它。但
浏览 0
提问于2013-07-15
得票数 0
2
回答
ImageButton
findViewById
返回
null
、
setContentView(R.layout.creditlayout); finish(); }); andr
浏览 3
提问于2014-11-28
得票数 1
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
Kotlin甩掉findViewbyId,原理几何
Kotlin语言入门之-null安全
undefined、null、NaN、‘’ ·实用技巧
如何打败坑神 Null
【第五期】Null与Undefined
热门
标签
更多标签
云服务器
ICP备案
对象存储
即时通信 IM
实时音视频
活动推荐
运营活动
广告
关闭
领券