gpt4 book ai didi

android - 资源链接失败/Android Studio College Project

转载 作者:行者123 更新时间:2023-12-03 08:45:43 26 4
gpt4 key购买 nike

我一直在尝试构建该项目,但是在构建该项目时我一直面临问题,任何人都可以帮助我。

代码在下面

    <?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Base.Theme.AppCompat" parent="Base.V26.Theme.AppCompat"/>
<style name="Base.Theme.AppCompat.Light" parent="Base.V26.Theme.AppCompat.Light"/>
<style name="Base.V26.Theme.AppCompat" parent="Base.V23.Theme.AppCompat">
<!-- We can use the platform styles on API 26+ -->
<item name="colorError">?android:attr/colorError</item>
</style>
<style name="Base.V26.Theme.AppCompat.Light" parent="Base.V23.Theme.AppCompat.Light">
<!-- We can use the platform styles on API 26+ -->
<item name="colorError">?android:attr/colorError</item>
</style>
<style name="Base.V26.Widget.AppCompat.Toolbar" parent="Base.V7.Widget.AppCompat.Toolbar">
<item name="android:touchscreenBlocksFocus">true</item>
<item name="android:keyboardNavigationCluster">true</item>
</style>
<style name="Base.Widget.AppCompat.Toolbar" parent="Base.V26.Widget.AppCompat.Toolbar"/>
</resources>

colors.xml文件在下面
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#000000</color>
<color name="colorPrimaryDark">#000000</color>
<color name="colorAccent">#FF4081</color>
</resources>

我得到的错误在下面
Android resource linking failed
/Users/arsalan/Downloads/Development/Pixlr/app/build/intermediates/incremental/mergeEditerDebugResources/merged.dir/values-v26/values-v26.xml:7: error: resource android:attr/colorError not found.
/Users/arsalan/Downloads/Development/Pixlr/app/build/intermediates/incremental/mergeEditerDebugResources/merged.dir/values-v26/values-v26.xml:11: error: resource android:attr/colorError not found.
/Users/arsalan/Downloads/Development/Pixlr/app/build/intermediates/incremental/mergeEditerDebugResources/merged.dir/values-v26/values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
error: failed linking references.

有人可以帮我吗,我必须将此项目提交给我的大学。另外,系统配置如下-

电脑型号-Macbook Air 2018(256GB)
软件模型-Android Studio 3.3(内部版本#AI-182.5107.16.33.5199772)
JRE-1.8.0_152-release-1248-b01 x86_64
JVM-JetBrains s.r.o的OpenJDK 64位服务器VM
作业系统版本-macOS 10.14.2

最佳答案

确保在build.gradle中至少使用api级别26
编译版本26
buildToolsVersion '26 .0.2'

关于android - 资源链接失败/Android Studio College Project,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54828818/

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