之前针对自己的蓝牙通信报错的原因找到了,这次就把解决方法添加上来
第一次是这样的:requestFeature() must be called before adding content
这里setContentView(R.layout.activity_main);比
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);方法调用更早,所以报错 了。
只需要保证setContentView方法在requestWindowFeature方法之后执行就可以了。
当第二次更改后,又出现了这样的错误: you cannot combine custom titles with other title features解决方法如下:在manifest文件中,修改android:theme="@style/android:Theme.Light"
就这么几步,问题解决了!
在这里要感谢网友 陈哈哈和baohanqing 这两个大神了,谢谢你们的指点!
如果还有高人有不同看法,请留言多指教!