Android: couldn't save which view has focus because the focused view ### has no id
来源:互联网 发布:类似美工云的网站 编辑:程序博客网 时间:2024/06/08 13:30
IT程序员开发必备-各类资源下载清单,史上最全IT资源,个人收藏总结!
问题:
Android: couldn't save which view has focus because the focused view ### has no id
可能引起原因有两种,对应解决方法如下:
解决方案一:
<application
android:icon="@drawable/icon" android:label="@string/app_name" >
<activity
android:label="@string/app_name"
android:configChanges="orientation|keyboardHidden|keyboard|screenLayout"
android:name=".Main" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
解决方案二:
What probably happened is that you created a thread in the surfaceCreated() method but didn’t stop it or get rid of it in the surfaceDestroy() method.
When you didn’t give a theme for the preferences, it took over the whole screen and your old surface was destroyed. But when you specified a dialog-like theme, the old surface was still there because it was visible underneath the preferences.
public void surfaceCreated(SurfaceHolder holder)
{
if (_thread == null || _thread.getState() == Thread.State.TERMINATED)
{
_thread = new TutorialThread(getHolder(), this);
_thread.setRunning(true);
_thread.start();
}
else
{
_thread.setRunning(true);
_thread.start();
}
}
This solved the problem for me, a thread’s start method cannot be called twice, so I had to reallocate…
http://forums.pragprog.com/forums/138/topics/4085
- Android: couldn't save which view has focus because the focused view ### has no id
- Android: couldn't save which view has focus because the focused view ### has no id
- Android: couldn't save which view has focus because the focused view ### has no
- The data couldn’t be read because it has been corrupted
- The data couldn’t be read because it has been corrupted
- Xcode6:The file couldn’t be opened because you don’t have permission to view it
- Xcode6:The file couldn’t be opened because you don’t have permission to view it
- Xcode6:The file couldn’t be opened because you don’t have permission to view it
- The file “***” couldn’t be opened because you don’t have permission to view it
- 解决方案:The file * couldn't be opened because you don't have permission to view it
- Xcode6:The file couldn’t be opened because you don’t have permission to view it
- the file couldn't be opened because you don't have permission to view it
- the file couldn't be opened because you don't have permission to view it 解决办法
- The file “xxx” couldn’t be opened because you don’t have permission to view it.
- The file “XXX” couldn’t be opened because you don’t have permission to view it.
- [ios]the file couldn't be opened because you don't have permission to view it
- The file couldn't be opened because you don't have permission to view it.解决办法
- Xcode6:The file couldn’t be opened because you don’t have permission to view it
- Android SMS(一) —— 读取短信
- 银行业务调度系统
- Android 国内应用市场的汇总
- Bitmap 之 getPixels() 的 stride
- Ubuntu 环境变量及 ADB 配置
- Android: couldn't save which view has focus because the focused view ### has no id
- Android VideoView播放视频
- 开发工程师人生之路(强烈推荐,分析的透彻!)
- Moravec检测器
- 在hibernate中save() saveOrUpdate() update() meger方法的讲解
- 如何在tomcat里面编辑一个简单的xml
- hibernate学习笔记(四)
- 《编写高质量代码:改善Java程序的151个建议》读书笔记二:基本类型
- struts之文件上传