2014-11-26 7 views
1

최근에 나는 오류가 있었지만, 더 나쁜 부분은 : 나는 아무것도하지 않았습니다!요람 건물은 attr 스타일을 찾지 못합니다

Error:(3, 6) No resource found that matches the given name: attr 'style'.

Error:(3, 6) Execution failed for task ':hiperCotacao:processDebugResources'. com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Development\java-dev\sdk\build-tools\21.0.2\aapt.exe package -f --no-crunch -I C:\Development\java-dev\sdk\platforms\android-21\android.jar -M C:\Development\java-dev\projects\HiperCotacao\hiperCotacao\build\intermediates\manifests\full\debug\AndroidManifest.xml -S C:\Development\java-dev\projects\HiperCotacao\hiperCotacao\build\intermediates\res\debug -A C:\Development\java-dev\projects\HiperCotacao\hiperCotacao\build\intermediates\assets\debug -m -J C:\Development\java-dev\projects\HiperCotacao\hiperCotacao\build\generated\source\r\debug -F C:\Development\java-dev\projects\HiperCotacao\hiperCotacao\build\intermediates\res\resources-debug.ap_ --debug-mode --custom-package trilha.hipercot.activities -0 apk --output-text-symbols C:\Development\java-dev\projects\HiperCotacao\hiperCotacao\build\intermediates\symbols\debug Error Code: 1 Output: C:\Development\java-dev\projects\HiperCotacao\hiperCotacao\build\intermediates\res\debug\values\values.xml:1431: error: Error: No resource found that matches the given name: attr 'style'.

내가 사용 :

Android Studio 1.0 RC 1
Build-tools v21.1.1
Min SDK Ver: 8
Target SDK Ver: 21
Using support-appcompat v4, v7. And also RecyclerView, CardView (All Maven resources)
Gradle Version: 2.1
Android Plugin Version: 0.14.4

을 그리고 여기에 'build.gradle'파일입니다

프로젝트가 모든 Gradle을 파일을 빌드 할 때
, 나는이 오류 로그를받을
apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 21 
    buildToolsVersion '21.1.1' 

    defaultConfig { 
     applicationId "trilha.hipercot.activities" 
     minSdkVersion 8 
     targetSdkVersion 21 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 
     } 
    } 
} 

dependencies { 
    compile project(':recyclerviewstickysection') 
    compile project(':androidsupportv4preferencefragment') 
    compile files('libs/ormlite-android-4.48.jar') 
    compile files('libs/ormlite-core-4.48.jar') 
    compile 'com.android.support:support-v4:21.0.2' 
    compile 'com.android.support:appcompat-v7:21.0.2' 
    compile 'com.android.support:recyclerview-v7:21.0.2' 
    compile 'com.android.support:cardview-v7:21.0.2' 
} 

오류 지점 :

<style name="Theme.HiperCotacao" parent="@style/Theme.AppCompat.Light"> 
    //... 
</style> 
,



편집

문제 그것은 내 "styles.xml"에 선했다 를 해결. 그런 뭔가 :

<item name="style">?attr/selectableItemBackground"</item> 

호기심 부분은 : 그것은 문제의 오른쪽 부분에 poiting되지 않았습니다. 다음 : 이후

<item name="android:foreground">?attr/selectableItemBackground</item> 

답변

1

스타일 내에서 스타일을 사용할 수 없습니다. 또 다른 해결책은 다른 스타일을 부모로 추가하는 것입니다.