2016-08-08 171 views
0

我正在(正在尝试)对现有Eclipse项目进行一些更改。 我导入到工作室,并添加了依赖项。Android Studio:找不到与给定名称匹配的资源:attr'searchViewTextField'

的build.gradle

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 23 
    buildToolsVersion '23.0.3' 

    defaultConfig { 
     applicationId "com.uniapps.prayer.times.almoazin" 
     minSdkVersion 16 
     targetSdkVersion 23 
     compileOptions { 
      sourceCompatibility JavaVersion.VERSION_1_7 
      targetCompatibility JavaVersion.VERSION_1_7 
     } 
    } 

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

dependencies { 
    compile files('libs/StartAppInApp-2.4.1.jar') 

// compile 'com.android.support:appcompat-v7:24.1.1' 
// compile "com.android.support:appcompat-v7:23.0.0" 
    compile "com.google.android.gms:play-services:9.4.0" 
// compile 'com.android.support:support-v4:23.0.0' 
    compile "com.android.support:appcompat-v7:23.+" 
    compile "com.android.support:support-v4:23.+" 
// compile 'com.android.support:support-v4:24.1.1' 

} 

我降落到下面的错误,那一刻我改变SDK版本低于23,我得到材料的设计错误。

请帮忙!

先谢谢您。

E:\Workspace\Intern\Prayer Timing\Pray Timmings\app\src\main\res\values\styles.xml 
Error:(199, 5) No resource found that matches the given name: attr 'searchResultListItemHeight'. 
Error:(199, 5) No resource found that matches the given name: attr 'searchDropdownBackground'. 
Error:(199, 5) No resource found that matches the given name: attr 'searchViewCloseIcon'. 
Error:(199, 5) No resource found that matches the given name: attr 'searchViewAutoCompleteTextView'. 
Error:(199, 5) No resource found that matches the given name: attr 'searchViewEditQuery'. 
Error:(199, 5) No resource found that matches the given name: attr 'searchViewEditQueryBackground'. 
Error:(199, 5) No resource found that matches the given name: attr 'searchViewGoIcon'. 
Error:(199, 5) No resource found that matches the given name: attr 'searchViewSearchIcon'. 
Error:(199, 5) No resource found that matches the given name: attr 'searchViewTextField'. 
Error:(199, 5) No resource found that matches the given name: attr 'searchViewTextFieldRight'. 
Error:(199, 5) No resource found that matches the given name: attr 'searchViewVoiceIcon'. 
Error:(242, 5) No resource found that matches the given name: attr 'searchDropdownBackground'. 
Error:(242, 5) No resource found that matches the given name: attr 'searchResultListItemHeight'. 
Error:(242, 5) No resource found that matches the given name: attr 'searchViewAutoCompleteTextView'. 
Error:(242, 5) No resource found that matches the given name: attr 'searchViewCloseIcon'. 
Error:(242, 5) No resource found that matches the given name: attr 'searchViewEditQuery'. 
Error:(242, 5) No resource found that matches the given name: attr 'searchViewEditQueryBackground'. 
Error:(242, 5) No resource found that matches the given name: attr 'searchViewGoIcon'. 
Error:(242, 5) No resource found that matches the given name: attr 'searchViewSearchIcon'. 
Error:(242, 5) No resource found that matches the given name: attr 'searchViewTextField'. 
Error:(242, 5) No resource found that matches the given name: attr 'searchViewTextFieldRight'. 
Error:(242, 5) No resource found that matches the given name: attr 'searchViewVoiceIcon'. 
Error:(269, 5) No resource found that matches the given name: attr 'searchDropdownBackground'. 
Error:(269, 5) No resource found that matches the given name: attr 'searchResultListItemHeight'. 
Error:(269, 5) No resource found that matches the given name: attr 'searchViewAutoCompleteTextView'. 
Error:(269, 5) No resource found that matches the given name: attr 'searchViewCloseIcon'. 
Error:(269, 5) No resource found that matches the given name: attr 'searchViewEditQuery'. 
Error:(269, 5) No resource found that matches the given name: attr 'searchViewEditQueryBackground'. 
Error:(269, 5) No resource found that matches the given name: attr 'searchViewGoIcon'. 
Error:(269, 5) No resource found that matches the given name: attr 'searchViewSearchIcon'. 
Error:(269, 5) No resource found that matches the given name: attr 'searchViewTextField'. 
Error:(269, 5) No resource found that matches the given name: attr 'searchViewTextFieldRight'. 
Error:(269, 5) No resource found that matches the given name: attr 'searchViewVoiceIcon'. 
Error:(628, 5) No resource found that matches the given name: attr 'spinnerMode'. 
Error:Execution failed for task ':app:processDebugResources'. 
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\Android\sdk\build-tools\24.0.1\aapt.exe'' finished with non-zero exit value 1 

styles.xml

我共享文件覆盖驱动器。我真的很感激任何帮助。

https://drive.google.com/open?id=0ByICCiyBOzYwQ2ZwcG5iNGlPZG8

+0

后的活动类和它的布局 –

+0

我很抱歉,我不知道是这种风格链接到活动?有很多活动。 –

+0

错误是与attr只与名称开始搜索,我不知道,请指导我,我怎么知道哪些活动与你分享。感谢您的考虑,Ojonugwa! –

回答

0

应避免在版本号使用+。

由于Android工作室说,

避免使用版本号+;可能导致不可预测和不可重复的 构建

尝试改变依赖于的build.gradle(模块:APP)。用下面的替换您的依赖关系。

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:24.1.1' 
    compile 'com.android.support:design:24.1.1' 
    compile 'com.google.android.gms:play-services:9.4.0' 

} 
+0

我欣赏,Abhinav!但不幸的是,它并没有解决问题。 –

相关问题