【发布时间】:2016-12-28 14:31:05
【问题描述】:
我正在尝试从 Udacity 学习 android 开发,但在导入项目时遇到了一些问题。 在任务中,提供了一个半准备好的项目作为开始的资源,该资源是关于创建语言翻译应用程序代码的。但是当我尝试编译项目时,会出现以下错误:
错误:(18, -1) android-apt-compiler: [main] C:\Users\Rushi\Downloads\ud839_Miwok-Starter-code\ud839_Miwok-Starter-code\app\src\main\res\values \styles.xml:18:错误:检索项目的父项时出错:找不到与给定名称“Theme.AppCompat.Light.DarkActionBar”匹配的资源。
错误:(19, -1) android-apt-compiler: [main] C:\Users\Rushi\Downloads\ud839_Miwok-Starter-code\ud839_Miwok-Starter-code\app\src\main\res\values \styles.xml:19:错误:错误:找不到与给定名称匹配的资源:attr 'colorPrimary'。
错误:(20, -1) android-apt-compiler: [main] C:\Users\Rushi\Downloads\ud839_Miwok-Starter-code\ud839_Miwok-Starter-code\app\src\main\res\values \styles.xml:20:错误:错误:找不到与给定名称匹配的资源:attr 'colorPrimaryDark'。
我认为它缺少任何类型的软件包或其他东西,因此尝试将 Android Studio 更新到最新版本,但没有成功。
我已检查属性 colorPrimaryDark 和 colorPrimary 是否引用了它们所做的正确资源。
【问题讨论】:
-
清洁有帮助吗? (转到构建 -> 清理项目)
-
@jak10h 代码清理不起作用
标签: android android-layout android-studio