项目重建后的Android Gradle错误

时间:2015-10-08 13:05:12

标签: android

我的android工作室突然失去了它,一切都工作得很好,在一个布局中添加了textview我尝试重建它以便我可以在我的手机上运行它的应用程序然后我的终端填充了下面的gradle错误

Error:Gradle: Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Applications/adt-bundle-mac-x86_64-20140702/sdk/build-tools/23.0.1/aapt'' finished with non-zero exit value 1
/Users/mwangolumbuka/Downloads/NemoVoluminator/app/src/main/res/values/colors.xml
Error:(1, -1) Gradle: Tag <declare-styleable> can not appear inside <declare-styleable>, only <attr>
/Users/mwangolumbuka/Downloads/NemoVoluminator/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-hdpi/values-hdpi.xml
Error:(1, -1) Gradle: Error retrieving parent for item: No resource found that matches the given name 'Base.Widget.AppCompat.DrawerArrowToggle.Common'.
Error:(5, 31) Gradle: No resource found that matches the given name: attr 'barLength'.
Error:(7, 34) Gradle: No resource found that matches the given name: attr 'drawableSize'.
Error:(6, 36) Gradle: No resource found that matches the given name: attr 'gapBetweenBars'.
/Users/mwangolumbuka/Downloads/NemoVoluminator/app/build/intermediates/exploded-aar/com.android.support/design/23.0.1/res/values-sw600dp/values-sw600dp.xml
Error:(1, -1) Gradle: Error retrieving parent for item: No resource found that matches the given name 'Base.Widget.Design.TabLayout'.
Error:(17, 30) Gradle: No resource found that matches the given name: attr 'tabGravity'.
Error:(18, 27) Gradle: No resource found that matches the given name: attr 'tabMode'.
/Users/mwangolumbuka/Downloads/NemoVoluminator/app/build/intermediates/exploded-aar/com.android.support/design/23.0.1/res/values-land/values-land.xml
Error:(1, -1) Gradle: Error retrieving parent for item: No resource found that matches the given name 'Base.Widget.Design.TabLayout'.
Error:(5, 30) Gradle: No resource found that matches the given name: attr 'tabGravity'.
Error:(6, 27) Gradle: No resource found that matches the given name: attr 'tabMode'.
/Users/mwangolumbuka/Downloads/NemoVoluminator/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-large/values-large.xml
Error:(1, -1) Gradle: Error retrieving parent for item: No resource found that matches the given name 'Base.Theme.AppCompat.Dialog.FixedSize'.
Error:(1, -1) Gradle: Error retrieving parent for item: No resource found that matches the given name 'Base.Theme.AppCompat.Light.Dialog.FixedSize'.
/Users/mwangolumbuka/Downloads/NemoVoluminator/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-v11/values-v11.xml
Error:(1, -1) Gradle: Error retrieving parent for item: No resource found that matches the given name 'Base.V7.Theme.AppCompat.Dialog'.
Error:(1, -1) Gradle: Error retrieving parent for item: No resource found that matches the given name 'Base.V7.Theme.AppCompat.Light.Dialog'.
Error:(71, 44) Gradle: No resource found that matches the given name: attr 'selectableItemBackground'.
/Users/mwangolumbuka/Downloads/NemoVoluminator/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-v12/values-v12.xml
Error:(1, -1) Gradle: Error retrieving parent for item: No resource found that matches the given name 'Base.V7.Widget.AppCompat.AutoCompleteTextView'.
Error:(1, -1) Gradle: Error retrieving parent for item: No resource found that matches the given name 'Base.V7.Widget.AppCompat.EditText'.
/Users/mwangolumbuka/Downloads/NemoVoluminator/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-v17/values-v17.xml
Error:(1, -1) Gradle: Error retrieving parent for item: No resource found that matches the given name 'Base.DialogWindowTitle.AppCompat'.
/Users/mwangolumbuka/Downloads/NemoVoluminator/app/src/main/res/values-v21/styles.xml
Error:(5, 35) Gradle: No resource found that matches the given name: attr 'windowActionBar'.
Error:(6, 33) Gradle: No resource found that matches the given name: attr 'windowNoTitle'.
/Users/mwangolumbuka/Downloads/NemoVoluminator/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-v21/values-v21.xml
Error:(1, -1) Gradle: Error retrieving parent for item: No resource found that matches the given name 'Base.V7.Theme.AppCompat'.
Error:(84, 36) Gradle: No resource found that matches the given name: attr 'actionBarDivider'.
Error:(85, 43) Gradle: No resource found that matches the given name: attr 'actionBarItemBackground'.
Error:(83, 33) Gradle: No resource found that matches the given name: attr 'actionBarSize'.
Error:(86, 37) Gradle: No resource found that matches the given name: attr 'actionButtonStyle'.
Error:(88, 44) Gradle: No resource found that matches the given name: attr 'actionMenuTextAppearance'.
Error:(87, 39) Gradle: No resource found that matches the given name: attr 'actionMenuTextColor'.
Error:(89, 40) Gradle: No resource found that matches the given name: attr 'actionModeBackground'.
Error:(90, 43) Gradle: No resource found that matches the given name: attr 'actionModeCloseDrawable'.
Error:(91, 45) Gradle: No resource found that matches the given name: attr 'actionOverflowButtonStyle'.
Error:(110, 45) Gradle: No resource found that matches the given name: attr 'autoCompleteTextViewStyle'.
Error:(102, 41) Gradle: No resource found that matches the given name: attr 'borderlessButtonStyle'.
Error:(111, 31) Gradle: No resource found that matches the given name: attr 'buttonStyle'.
Error:(112, 36) Gradle: No resource found that matches the given name: attr 'buttonStyleSmall'.
Error:(113, 33) Gradle: No resource found that matches the given name: attr 'checkboxStyle'.
Error:(114, 40) Gradle: No resource found that matches the given name: attr 'checkedTextViewStyle'.
Error:(103, 37) Gradle: No resource found that matches the given name: attr 'dividerHorizontal'.
Error:(104, 35) Gradle: No resource found that matches the given name: attr 'dividerVertical'.
Error:(105, 38) Gradle: No resource found that matches the given name: attr 'editTextBackground'.
Error:(106, 33) Gradle: No resource found that matches the given name: attr 'editTextColor'.
Error:(115, 33) Gradle: No resource found that matches the given name: attr 'editTextStyle'.
Error:(92, 37) Gradle: No resource found that matches the given name: attr 'homeAsUpIndicator'.
Error:(107, 49) Gradle: No resource found that matches the given name: attr 'listChoiceBackgroundIndicator'.
Error:(95, 48) Gradle: No resource found that matches the given name: attr 'listPreferredItemHeightSmall'.
Error:(116, 36) Gradle: No resource found that matches the given name: attr 'radioButtonStyle'.
Error:(117, 34) Gradle: No resource found that matches the given name: attr 'ratingBarStyle'.
Error:(100, 44) Gradle: No resource found that matches the given name: attr 'selectableItemBackground'.
Error:(101, 54) Gradle: No resource found that matches the given name: attr 'selectableItemBackgroundBorderless'.
Error:(118, 32) Gradle: No resource found that matches the given name: attr 'spinnerStyle'.
Error:(96, 48) Gradle: No resource found that matches the given name: attr 'textAppearanceLargePopupMenu'.
Error:(97, 48) Gradle: No resource found that matches the given name: attr 'textAppearanceSmallPopupMenu'.
Error:(1, -1) Gradle: Error retrieving parent for item: No resource found that matches the given name 'Base.V7.Theme.AppCompat.Light'.
/Users/mwangolumbuka/Downloads/NemoVoluminator/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-v22/values-v22.xml
Error:(7, 43) Gradle: No resource found that matches the given name: attr 'actionModeShareDrawable'.
/Users/mwangolumbuka/Downloads/NemoVoluminator/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-v23/values-v23.xml
Error:(11, 43) Gradle: No resource found that matches the given name: attr 'actionBarItemBackground'.
Error:(13, 37) Gradle: No resource found that matches the given name: attr 'controlBackground'.

这是请求的gradle文件

apply plugin: 'com.android.application'

 android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
defaultConfig {
    applicationId "aubry.chromio.com.nemovoluminator"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
productFlavors {
}
}

 dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
'com.pkmmte.view:circularimageview:1.1'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:appcompat-v7:23.0.1'
}

我是一个新手,所以我完全不知道错误是什么意思,我本可以说它的主题,但我一直使用自定义主题,直到今天添加textview并重建项目,谢谢你提前。

1 个答案:

答案 0 :(得分:1)

我已经修复了错误,令人惊讶的是如此简单的事情会产生一堆粪便,错误发生在我的attrs.xml文件中,在修复文件之前就像

# 2014, The year of ![](https://cloud.githubusercontent.com/assets/2864371/10368192/cad27ed0-6ddc-11e5-8150-4f9c14ab9602.png)

<?xml version="1.0" encoding="utf-8"?>

    

我忘了结束声明样式的CircularImageView,因此它与SpinnerTextView重叠,在结束它所有工作没有错误后,我的新文件看起来像

<declare-styleable name="CircularImageView">
    <attr name="border" format="boolean"></attr>
    <attr name="border_width" format="dimension"></attr>
    <attr name="border_color" format="color"></attr>
    <attr name="shadow" format="boolean"></attr>

//i forgot to end the declare-styleable CircularImageView

    <declare-styleable name="SpinnerTextView">
        <attr name="android:prompt" />
        <attr name="android:entries" />
    </declare-styleable>


<declare-styleable name="Theme">
    <attr name="circularImageViewStyle" format="reference"></attr>
</declare-styleable>

<?xml version="1.0" encoding="utf-8"?>

感谢大家抽出时间:D,我希望将来有人帮助。