无法生成android项目

无法生成android项目,android,android-studio,gradle,compiler-errors,Android,Android Studio,Gradle,Compiler Errors,我刚刚接手了一个android项目,没有任何文档,所以我的(第一个)工作就是让应用程序开始构建 我正在使用Android Studio 1.5.1 我的生成输出如下所示: AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027stextColorLink\u0027.","sources":[{"file":"D:\\android\\jobmatch\\app\\src\

我刚刚接手了一个android项目,没有任何文档,所以我的(第一个)工作就是让应用程序开始构建

我正在使用Android Studio 1.5.1

我的生成输出如下所示:

AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027stextColorLink\u0027.","sources":[{"file":"D:\\android\\jobmatch\\app\\src\\main\\res\\values\\styles.xml","position":{"startLine":47,"startColumn":4,"startOffset":2338,"endLine":54,"endColumn":12,"endOffset":2702}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027stextSize\u0027.","sources":[{"file":"D:\\android\\jobmatch\\app\\src\\main\\res\\values\\styles.xml","position":{"startLine":47,"startColumn":4,"startOffset":2338,"endLine":54,"endColumn":12,"endOffset":2702}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027stextStyle\u0027.","sources":[{"file":"D:\\android\\jobmatch\\app\\src\\main\\res\\values\\styles.xml","position":{"startLine":47,"startColumn":4,"startOffset":2338,"endLine":54,"endColumn":12,"endOffset":2702}}],"original":"","tool":"AAPT"}
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
    Execution failed for task ':app:processDebugResources'.
    > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\tr\AppData\Local\Android\sdk\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1
 * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output
apply plugin: 'com.android.application'

android {
    compileSdkVersion 'Google Inc.:Google APIs:23'
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.appchance.jobmatcher"
        minSdkVersion 14
        targetSdkVersion 21
    }

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

dependencies {
    compile 'com.android.support:support-v4:21.0.3'
    compile files('libs/android-support-v7-recyclerview.jar')
    compile files('libs/crashlytics.jar')
    compile files('libs/httpmime-4.1.2.jar')
    compile files('libs/listviewanimations_lib-core-slh_3.1.0.jar')
    compile files('libs/listviewanimations_lib-core_3.1.0.jar')
    compile files('libs/listviewanimations_lib-manipulation_3.1.0.jar')
    compile files('libs/systembartint-1.0.4.jar')
    compile 'com.android.support:appcompat-v7:+'
}
我没有包括所有的错误,因为它会不断地出现关于缺少attr资源的类似错误

我的gradle文件如下所示:

AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027stextColorLink\u0027.","sources":[{"file":"D:\\android\\jobmatch\\app\\src\\main\\res\\values\\styles.xml","position":{"startLine":47,"startColumn":4,"startOffset":2338,"endLine":54,"endColumn":12,"endOffset":2702}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027stextSize\u0027.","sources":[{"file":"D:\\android\\jobmatch\\app\\src\\main\\res\\values\\styles.xml","position":{"startLine":47,"startColumn":4,"startOffset":2338,"endLine":54,"endColumn":12,"endOffset":2702}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027stextStyle\u0027.","sources":[{"file":"D:\\android\\jobmatch\\app\\src\\main\\res\\values\\styles.xml","position":{"startLine":47,"startColumn":4,"startOffset":2338,"endLine":54,"endColumn":12,"endOffset":2702}}],"original":"","tool":"AAPT"}
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
    Execution failed for task ':app:processDebugResources'.
    > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\tr\AppData\Local\Android\sdk\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1
 * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output
apply plugin: 'com.android.application'

android {
    compileSdkVersion 'Google Inc.:Google APIs:23'
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.appchance.jobmatcher"
        minSdkVersion 14
        targetSdkVersion 21
    }

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

dependencies {
    compile 'com.android.support:support-v4:21.0.3'
    compile files('libs/android-support-v7-recyclerview.jar')
    compile files('libs/crashlytics.jar')
    compile files('libs/httpmime-4.1.2.jar')
    compile files('libs/listviewanimations_lib-core-slh_3.1.0.jar')
    compile files('libs/listviewanimations_lib-core_3.1.0.jar')
    compile files('libs/listviewanimations_lib-manipulation_3.1.0.jar')
    compile files('libs/systembartint-1.0.4.jar')
    compile 'com.android.support:appcompat-v7:+'
}
Style.xml:

<resources xmlns:android="http://schemas.android.com/apk/res/android">

    <style name="AppTheme" parent="AppTheme.Base" />

    <style name="AppTheme.Translucent" parent="AppTheme.Base">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
    </style>

    <style name="AppTheme.Base" parent="@style/Theme.AppCompat.Light.DarkActionBar">
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="android:windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
        <item name="android:colorForeground">@color/colorForeground</item>
        <item name="android:listChoiceIndicatorMultiple">@drawable/selector_check_box_empty</item>
        <item name="android:listChoiceIndicatorSingle">@drawable/selector_check_box_empty</item>
        <item name="actionMenuTextColor">@color/white</item>
        <item name="android:actionMenuTextColor">@color/white</item>
        <item name="sswitchStyle">@style/SwitchCustom</item>
    </style>

    <style name="ActionBarThemeOverlay" parent="">
        <item name="android:textColorPrimary">#fff</item>
        <item name="colorControlNormal">#fff</item>
        <item name="colorControlHighlight">#8fff</item>
        <item name="selectableItemBackground">@drawable/ab_item_background</item>
    </style>

    <style name="CustomSwitchTextAppearance" parent="TextAppearance.AppCompat.Widget.Switch">
        <item name="android:textColor">@color/white</item>
        <item name="android:textStyle">bold</item>
        <item name="android:textSize">11sp</item>
    </style>

    <style name="SwitchCustom">
        <item name="strack">@drawable/custom_switch_track</item>
        <item name="sthumb">@drawable/custom_switch_thumb</item>
        <item name="stextOn">@string/textOn</item>
        <item name="stextOff">@string/textOff</item>
        <item name="sthumbTextPadding">6dip</item>
        <item name="sswitchMinWidth">60dip</item>
        <item name="sswitchPadding">0dip</item>
        <item name="sswitchTextAppearance">@style/TextAppearanceSwitch</item>
    </style>

    <style name="TextAppearanceSwitch">
        <item name="stextColor">@color/white</item>
        <item name="stextColorHighlight">@color/white</item>
        <item name="stextColorHint">@color/white</item>
        <item name="stextColorLink">@color/white</item>
        <item name="stextSize">11sp</item>
        <item name="stextStyle">1</item>
    </style>

</resources>

真的
@android:彩色/透明
@颜色/原色
@颜色/原色暗
@颜色/颜色重音
真的
假的
@彩色/彩色前景
@可绘图/选择器\u复选框\u空
@可绘图/选择器\u复选框\u空
@颜色/白色
@颜色/白色
@样式/开关自定义
#fff
#fff
#8fff
@可绘制/ab_项目_背景
@颜色/白色
大胆的
11便士
@可牵引/定制道岔轨道
@可拉拔/定制开关
@字符串/文本
@字符串/文本关闭
6dip
60度
0度
@样式/文本外观开关
@颜色/白色
@颜色/白色
@颜色/白色
@颜色/白色
11便士
1.

我已经搜索了一个解决方案,但找不到,希望有人能给我一些建议,因为我是android开发新手。

1>清理您的项目并运行

如果不是

2> 处理add-into build.gradle文件

dexOptions {
        javaMaxHeapSize "4g"
    }

1> 清理项目并运行

如果不是

2> 处理add-into build.gradle文件

dexOptions {
        javaMaxHeapSize "4g"
    }

只需将您的
compileSdkVersion'Google Inc.:Google api:23'
更改为
compileSdkVersion 23

只需将
compileSdkVersion'Google Inc.:Google api:23'
更改为
compileSdkVersion 23

检查所有资源文件名,这可能是由某个资源名称中的错误字符引起的。您可以发布ATTR文件吗?我不知道这是问题所在,但想看看是否有什么问题,请检查您所有的资源文件名,这可能是由于某些资源名称中的错误字符造成的。您可以发布ATRS文件吗?我不知道这是问题所在,但我想看看是否有些东西看起来很奇怪,现在尝试了这两种方法,结果与以前相同;现在你失去了我,我对安卓开发还不熟悉。请详细说明。在项目中创建一个应用程序类,并在清单文件中声明。执行我告诉您的更改,现在和以前一样。将应用程序类创建为extend MultiDex Application并放置MultiDex.install(此);现在你失去了我,我对安卓开发还不熟悉。请详细说明。在您的项目中创建一个应用程序类,并在清单文件中声明。做我告诉过您的更改吗