我打開現有項目,在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