gpt4 book ai didi

android - 呈现问题 : Android Studio 1. 2.1.1 和 Gradle 1.2.3

转载 作者:太空宇宙 更新时间:2023-11-03 11:26:08 25 4
gpt4 key购买 nike

我用 gradle 1.2.3 将 android studio 更新到最新版本“1.2.1.1”..但是我的项目和新项目有问题..由于这个问题,所有布局文件都无法显示预览:

Rendering problems

The following classes could not be found: android.support.v7.internal.widget.ActionBarOverlayLayout

我找到了将主题更改为的解决方案:

Base.Theme.Appcompat

但现在它不显示任何自定义 View 甚至 Appcompat View 。它给了我这个错误:

The following classes could not be found: - android.support.v7.widget.Toolbar (Fix Build Path, Create Class)
The following classes could not be found: - CustomView.VoiceView (Fix Build Path, Create Class)
Tip: Try to build the project.

我还尝试将渲染版本更改为 21 而不是 22..它不起作用..清理和重建不做任何事情..提前致谢。

更新[添加样式.xml]:我的样式代码是:

<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="@style/Base.Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/light_blue_500</item>
<item name="colorPrimaryDark">@color/light_blue_700</item>
<item name="colorAccent">@color/light_ornage_500</item>
</style>



<style name="RevealOrange" parent="@style/Base.Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/light_blue_500</item>
<item name="colorPrimaryDark">@color/light_ornage_700</item>
<item name="colorAccent">@color/light_ornage_500</item>
</style>

</resources>

最佳答案

这个主题对我有用试试这个

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/my_awesome_color</item>
<item name="colorPrimaryDark">@color/my_awesome_darker_color</item>
<item name="colorAccent">@color/accent</item>
</style>

关于android - 呈现问题 : Android Studio 1. 2.1.1 和 Gradle 1.2.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30328271/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com