我打开现有项目,在Android Studio中2.1 Beta 2的正常工作和我有一些错误,当我运行该项目。Android的易编译:[]错误:错误检索父的项目:无资源发现在给定的名字'匹配
风格领域是:
<style name="AppBaseTheme" parent="@android:style/Theme.AppCompat.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
<style name="AppBaseTheme" parent="@android:style/Theme.AppCompat.Light">
<!-- API 11 theme customizations can go here. -->
</style>
<style name="AppBaseTheme" parent="@android:style/Theme.AppCompat.Light">
<!-- API 14 theme customizations can go here. -->
</style>
而在AndroidManifest.xml
我有喜欢本作的主题参考:
<application
android:theme="@style/AppTheme" >
的错误是:
Error:(7, -1) android-apt-compiler: [mobile] C:\mobile\trunk\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.AppCompat.Light'.
Error:(7, -1) android-apt-compiler: [mobile] C:\mobile\trunk\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Light'.
Error:(8, -1) android-apt-compiler: [mobile] C:\mobile\trunk\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Light'.
我试着几种方法来解决这个错误,但没有成功。请帮助我一个人。
@ Derk-Jam您的解决方案仍然无法解决我的问题。错误是一样的。 – ruru
@ruru我在2.1 在模块 - >'build.gradle' >>> 'compileSdkVersion 23' 'buildToolsVersion “24rc2”'' 编译“com.android.support:appcompat-v7:23.3。 0'' 顶层 - >'build.gradle' >>> 'classpath'com.android.tools.build:gradle:2.1.0'' –
我无法创建生成文件夹,因为我可以不运行这个项目。 – ruru