我一直在尝试建立这个项目,但我一直面临着问题的同时,它的建设,有谁可以帮助我。
代码如下
<?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 (256 OS )软件型号- Android Studio 3.3 (Build #AI-182.5107.16.33.5199772) JRE - 1.8.0_152-release-1248-b01 x86_64 JVM - OpenJDK 64位服务器VM,由JetBrains s.r.o操作系统版本- macOS 10.14.2提供
发布于 2019-02-22 22:38:32
确保在build.gradle compileSdkVersion 26 buildToolsVersion '26.0.2‘中至少使用api级别26。
https://stackoverflow.com/questions/54828818
复制相似问题