現狀:解決:程序兼容性/ Chromecast的Android中-L預覽
我目前正在建設我的應用程序的Android L的新版本,我也Chromecast的一體化進程。 該應用程序工作正常,只要我用我的自定義樣式擴展Theme.Material,但不顯示演員按鈕。
問題:
只要我改變Theme.AppCompat,它給我的錯誤:
Error:Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.AppCompat.Light.DarkActionBar'.
和同樣適用於在全息主題爲好。
這裏是我的的build.gradle(libs文件夾爲空,順便說一句。):
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-L'
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.myapp.myapp"
minSdkVersion 'android-L'
targetSdkVersion 'android-L'
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// You must install or update the Support Repository through the SDK manager to use this dependency.
compile 'com.android.support:appcompat-v7:+'
compile 'com.android.support:support-v4:+'
compile 'com.android.support:cardview-v7:+'
compile 'com.android.support:mediarouter-v7:+'
compile 'com.google.android.gms:play-services:+'
}
這裏是價值觀/ styles.xml的相關部分:
<style name="SK" parent="android:Theme.AppCompat.Light.DarkActionBar">
用於使用Theme.Holo.Light.DarkActionBar
和值 - V21/styles.xml:
<style name="SK" parent="@android:style/Theme.AppCompat.Light.DarkActionBar">
用於wirk與Theme.Material.Light.DarkActionBar
我已經清洗和重建項目,但它總是可以追溯到顯示我的錯誤關於丟失父。 據我可以從類似的問題收集,所有相關的圖書館都包括在內,都使用可用的最新版本。 我也嘗試手動添加庫到libs /文件夾沒有成功。 我的SDK管理器顯示所有東西都已安裝並且是最新的。
我在這裏錯過了什麼? 預先感謝您的時間。