意图启动时的RuntimeException启动时、意图、RuntimeException

2023-09-07 13:20:06 作者:不肯快乐的心

我得到这个例外,每个屏幕的开始,无论给予高度。了java.lang.RuntimeException:二进制XML文件行#25:你必须提供一个layout_height属性

I am getting this exception at start of every screen ,irrespective of giving height. java.lang.RuntimeException: Binary XML file line #25: You must supply a layout_height attribute.

推荐答案

您需要删除的属性父=安卓主题为指定活动。您的问题将得到解决。请参阅计算器这链接

You need to remove attribute parent="android:Theme" for the specified activity. your problem will solved. Please refer to this link of stackoverflow

如果您使用的安卓主题=@安卓风格/ Theme.Holo在AndroidManifest.xml中,然后在Android 2.3上运行你的应用程序设备或Android 2.2设备,然后你会看到在启动时发出警告。一个可能的解决方案是这里:

If you're using the android:theme="@android:style/Theme.Holo" in your AndroidManifest.xml and then running your app on an Android 2.3 device or Android 2.2 device, then you will see that warning at startup. A possible solution is here: