腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
4
回答
findViewById
导致
崩溃
。
为什么
?
获取摄像头预览没有问题,但当我尝试对按钮对象使用
findViewById
时,应用程序将
崩溃
。不知道
为什么
会这样。/* * This line causes the crash TagBttn = (Button)
findViewById
(R.id.tag); surfac
浏览 0
提问于2012-04-21
得票数 0
回答已采纳
2
回答
OnActivityResult函数中的
findViewById
()
导致
崩溃
、
、
、
但是
findViewById
函数会
导致
我的应用程序
崩溃
。我怎么才能修复它?data.getStringExtra(AddEditMedicineActivity.medTime); Button btn = (Button)
findViewById
浏览 12
提问于2013-08-18
得票数 0
2
回答
如何根据按下的按钮更改编辑文本框的实际大小?
、
、
、
、
到目前为止,这是我的代码,我想我所做的是改变文本的大小,但是当点击按钮时它会
崩溃
,所以我不知道。savedInstanceState); Button bSize1 = (Button)
findViewById
(R.id.bSize1); Button bSize2 = (Button) <e
浏览 4
提问于2016-02-27
得票数 0
回答已采纳
1
回答
使用微调器时无法启动组件信息
、
super.onCreate(savedInstanceState); spinner = (Spinner)
findViewById
浏览 1
提问于2014-07-11
得票数 0
2
回答
如何从一个复选框中选中列表视图中的所有复选框
、
、
chk_foo可以工作,但是初始化后与chk_bar相关的任何内容都会
导致
应用程序
崩溃
。另外,如果我为setOnCheckedChangeListener创建一个chkbox_bar,这也会
导致
应用程序
崩溃
。有人知道
为什么
会发生这种事吗?我怎样才能解决这个问题?btn_foo = (Button)
findViewById
(R.id.btn_foo);barList = (ListView)
findViewById
(R.id.lv_barList);chk_foo=
浏览 2
提问于2012-05-09
得票数 0
回答已采纳
3
回答
按括号将字符串转换为字符串会在Android上
崩溃
。
、
、
、
、
我知道如何使用TextView ()从toString()获取字符串,但我想了解
为什么
如果我将TextView的文本以括号形式转换为String,它会
导致
toString在运行时
崩溃
?例如"String text = (String)((TextView)
findViewById
(R.id.myTextViewId)).getText();"“
浏览 0
提问于2013-10-24
得票数 1
回答已采纳
2
回答
Runnable在方法中声明时工作;在方法外部声明时
崩溃
、
、
“几秒钟后),所以我有: super.onResume(); public class MainActivity extends ActionBarActivity {
浏览 2
提问于2014-12-04
得票数 0
2
回答
为什么
按钮一定要在setContentView之后定义?
、
、
、
到底
为什么
这会
导致
我的应用程序
崩溃
?Button schoolNameButton = (Button)
findViewById
(R.id.schoolNameButton); setContentView(myVIew);
浏览 0
提问于2013-02-15
得票数 0
回答已采纳
2
回答
通过编辑文本将文本设置为文本视图
、
、
、
savedInstanceState); button1 = (Button)
findViewById
(R.id.button1); textV
浏览 6
提问于2013-09-19
得票数 1
回答已采纳
1
回答
Java Canvas to XML布局"Hello World“语法
、
、
我曾尝试用
findViewById
()定位目标ImageView,但这些尝试要么使应用程序
崩溃
,要么什么也没做。 我不想在java中创建完整的xml布局。
浏览 1
提问于2015-11-12
得票数 0
1
回答
FindViewById
()
导致
应用程序
崩溃
,componentInfo出现问题
、
、
所以,当这两行被注释掉时,它是很好的,但是随着它们的出现,它
崩溃
了。EditText convertValue = (EditText)
findViewById
(R.id.et_value_convert);下面是我的完整类代码,下面是xml。android.widget.TextView; EditT
浏览 0
提问于2012-12-17
得票数 3
回答已采纳
1
回答
为什么
findViewById
()会使relativeLayout init命令
崩溃
?
、
、
、
显然,棋盘将是弹出窗口的父窗口,这就是
为什么
我希望使用RelativeLayout引用弹出窗口来查看棋盘。v=wxqgtEewdfo });应用程序
崩溃
的是那条我假设
findViewById
()没有找到ID chessboardlayout,但我不知道原因。但是,当我遵循调试器时,
findViewById
()调用返回null,这不会很好。我已经阅读
浏览 6
提问于2017-12-03
得票数 1
回答已采纳
1
回答
为什么
在webview android应用程序中没有使用这个源代码呢?
、
、
我的应用程序有两个活动,一个是启动屏幕,另一个是活动,当我运行我的应用程序时,它运行良好,但当我试图返回时,应用程序突然
崩溃
或完全退出。savedInstanceState); WebView myWebView = (WebView)
findViewById
浏览 13
提问于2021-12-10
得票数 0
1
回答
AsyncTask onPostExecute中的错误
、
、
savedInstanceState) { display_name_tv = (TextView)
findViewById
浏览 3
提问于2015-07-19
得票数 0
回答已采纳
2
回答
你好,我正在尝试运行一个简单的web视图,但是我被困住了。
、
、
、
你好,我是android工作室的新手,这应该是一个基本的web视图应用程序,我的应用程序成功启动,但应用程序在打开之前
崩溃
了。
浏览 2
提问于2021-08-28
得票数 0
1
回答
创建对ImageView的引用
导致
应用程序
崩溃
、
、
、
我现在的问题是,当我引用ImageView时,应用程序会
崩溃
。super.onCreate(savedInstanceState); wd = (ImageView) this.
findViewById
layout_height="match_parent" /> </RelativeLayout&
浏览 0
提问于2012-12-31
得票数 0
回答已采纳
1
回答
构建一个Android启动器
、
、
、
、
我正在构建一个Android启动程序,但在尝试将已安装的应用程序添加到GridView时不断
崩溃
。 private void loadGridView() { } ImageView appIcon = (ImageView) convertView.<e
浏览 0
提问于2017-04-24
得票数 0
1
回答
如果我可以直接使用LayoutInflater ()获得视图,
为什么
要使用
findViewById
()?
、
); (ViewGroup)
findViewById
但是,如果我们只需要设置土司视图,那么
为什么
不使用
findviewbyid
,如下所示:toast.setView(
findViewById
(R.id.toast_layout_root)); toast.setDuration(toast.LE
浏览 2
提问于2015-11-10
得票数 2
回答已采纳
2
回答
由于共享首选项,应用程序在启动时
崩溃
、
、
由于nullpointerexception,应用程序现在正在
崩溃
。我在谷歌上发现了许多类似的问题,但是没有一个解决方案奏效。这个应用程序应该转发一个呼叫,其中接收转发呼叫的号码存储在共享首选项中。super.onCreate(savedInstanceState);EditText editText1 = (EditText)
findViewById</em
浏览 0
提问于2014-02-12
得票数 0
回答已采纳
2
回答
LinearLayout
findViewById
问题-
崩溃
、
savedInstanceState) { LinearLayout ln = (LinearLayout) this.
findViewById
浏览 0
提问于2011-03-11
得票数 13
回答已采纳
点击加载更多
相关
资讯
Table cache 导致 MySQL 崩溃
WebKit中的漏洞崩溃,并会导致iPhone和iPad重启
微软 Edge 109 用户反馈本次更新导致 Application Guard 崩溃
海底电缆故障导致西非网络崩溃长达48小时
微软 4 月更新惹祸,导致 Word、Excel 2016 应用崩溃
热门
标签
更多标签
云服务器
ICP备案
腾讯会议
云直播
对象存储
活动推荐
运营活动
广告
关闭
领券