I just started using Android Studio. I created my first "HelloAndroid" project in it, and under layout, I opened activity_main.xml. The view is not rendered well as expected. It shows an error: "Rendering Problems: Missing Styles. Is the correct theme chosen for this layout?"
我刚开始使用Android Studio。我在其中创建了第一个“HelloAndroid”项目,在布局下,我打开activity_main.xml。视图呈现得不像预期的那样好。它显示了一个错误:“呈现问题:缺少样式。这个布局是否选择了正确的主题?
I'm new to Android Studio, and I'm not sure why I'm getting this error. When I was using Eclipse with the ADK plugin I didn't have to configure anything to render successfully.
我是Android Studio的新手,我不知道为什么会有这个错误。当我使用Eclipse和ADK插件时,我不需要配置任何东西来成功呈现。
3 个解决方案
#1
0
I think you need to add the appCompat dependency in your gradle build file.
我认为您需要在gradle构建文件中添加appCompat依赖项。
#2
0
Click the green robot icon to choose lower android version then press refresh button.
点击绿色机器人图标,选择下android版本,点击刷新按钮。
Similar to this question too.
这个问题也很相似。
activity_main.xml: Failed to find the style corresponding to the id 2130771996
activity_main。xml:未能找到对应于id 2130771996的样式。
#3
0
I just ran into this myself and it turns out I did not have the lowest SDK installed for the minimum I had selected. Make sure when selecting your minimum SDK that you have it installed.
我自己也遇到过这个问题,结果发现我没有安装最低的SDK以满足我所选择的最小值。确保在选择您安装的最小SDK时。
#1
0
I think you need to add the appCompat dependency in your gradle build file.
我认为您需要在gradle构建文件中添加appCompat依赖项。
#2
0
Click the green robot icon to choose lower android version then press refresh button.
点击绿色机器人图标,选择下android版本,点击刷新按钮。
Similar to this question too.
这个问题也很相似。
activity_main.xml: Failed to find the style corresponding to the id 2130771996
activity_main。xml:未能找到对应于id 2130771996的样式。
#3
0
I just ran into this myself and it turns out I did not have the lowest SDK installed for the minimum I had selected. Make sure when selecting your minimum SDK that you have it installed.
我自己也遇到过这个问题,结果发现我没有安装最低的SDK以满足我所选择的最小值。确保在选择您安装的最小SDK时。