2016-05-11 16 views
0

Ich habe gerade ein Android-Projekt ohne Dokumentation übernommen, also ist meine (erste) Aufgabe, die App zu erstellen.Ich kann kein Android-Projekt erstellen

Ich bin mit Android Studio 1.5.1

Meine Build-Ausgabe sieht wie folgt aus:

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 

ich nicht alle Fehler enthalten war Ursache auf und mit ähnlichen Fehlern geht über attr Ressourcen fehlen .

Meine gradle Datei sieht wie folgt aus:

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> 

ich nach einer Lösung gesucht, konnte aber einen finden, hoffen, dass jemand mir einige Hinweise geben kann, wie ich neu in Android-Entwicklung bin.

+0

Überprüfen Sie alle Ihre Ressourcen Dateinamen, die durch ein falsches Zeichen in einem Ressourcennamen verursacht werden können. – Nanoc

+0

Können Sie Ihre Attrs-Datei posten? Ich weiß nicht, das ist das Problem, aber ich würde gerne sehen, wenn etwas funky aussieht – zgc7009

Antwort

0

1> Ihr Projekt reinigen und

laufen, wenn sie nicht

2> die in build.gradle Datei hinzufügen Arbeits

dexOptions { 
     javaMaxHeapSize "4g" 
    } 
+0

Versuchte beide jetzt, das gleiche Ergebnis wie zuvor. – iCediCe

+0

Machen Sie die Apllication-Klasse als extend MultiDexApplication und setzen Sie MultiDex.install (this); in oncreate –

+0

jetzt hast du mich verloren, ich bin neu in Android-Entwicklung. Bitte erläutern. – iCediCe

0

einfach Ihre compileSdkVersion 'Google Inc.:Google APIs:23'-compileSdkVersion 23 ändern.

Verwandte Themen