2017-12-19 5 views
0

Ich habe ein Problem, das ist, dass ich keine App auf meinem Telefon ausführen kann, kompiliert es nicht auf AS.Build fehlgeschlagen auf Android Studio

Error:No resource found that matches the given name (at 'theme' with value '@style/AppTheme').

Error:No resource found that matches the given name (at 'theme' with value '@style/AppTheme').

Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt

Information:BUILD FAILED

Ich habe versucht, color mit item aber die Fehlermeldung ersetzt, ist diese:

Error:Error: Unsupported node 'item' Error:Execution failed for task ':app:mergeDebugResources'. C:\Users\X\AndroidStudioProjects\X\app\src\main\res\values\styles.xml: Error: Unsupported node 'item'

Das ist mein "style.xml" file:

<resources> 
    <color name="colorPrimary">#21222c</color> 
    <color name="colorPrimaryDark">#21222c</color> 
    <color name="colorAccent">#fff</color> 
    <!-- blue style gradient --> 
    <color name="bluestartcolor">#47f9fe</color> 
    <color name="blueendcolor">#1295fd</color> 
    <!-- orange style gradient --> 
    <color name="orangestartcolor">#feed64</color> 
    <color name="orangeendcolor">#dda660</color> 
    <!-- pink style gradient --> 
    <color name="pinkstartcolor">#fd75a5</color> 
    <color name="pinkendcolor">#ea1e77</color> 
    <!-- purplle style gradient --> 
    <color name="purplestartcolor">#f75fe1</color> 
    <color name="purpeendcolor">#c425ec</color> 
    <!-- green style gradient --> 
    <color name="greenstartcolor">#b4fa51</color> 
    <color name="greenendcolor">#78cb59</color> 
    </resources> 

Und das ist mein Datei "colors.xml":

<?xml version="1.0" encoding="utf-8"?> 
<resources> 
<color name="colorPrimary">#21222c</color> 
<color name="colorPrimaryDark">#21222c</color> 
<color name="colorAccent">#fff</color> 
</resources> 

Wenn Sie noch etwas brauchen, dass ich Sie wissen lassen sollte, lassen Sie es mich wissen.

+0

Mögliches Duplikat [Keine Ressource gefunden, das der angegebene Name '@ style/Theme.AppCompat.Light'] (https://stackoverflow.com/questions/21059612/no-resource-found-that-entspricht-dem-gegebenen-name-style-theme-appcompat-light) – Psytho

+0

Wo hast du '@ style/AppTheme' deklariert? –

+0

Eigentlich haben alle ihren Stil in einer anderen Datei "xcolor.xml" – pintovillamar

Antwort

0

Haben Sie USB-Debugging in Ihrem Telefon aktiviert? und Dies ist die Build.gradle-Datei.

apply plugin: 'com.android.application' 
android { 
compileSdkVersion 26 
defaultConfig { 
    applicationId "com.example.pawan.listvieew" 
    minSdkVersion 15 
    targetSdkVersion 26 
    versionCode 1 
    versionName "1.0" 
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 

}

dependencies { 
implementation fileTree(dir: 'libs', include: ['*.jar']) 
implementation 'com.android.support:appcompat-v7:26.1.0' 
implementation 'com.android.support.constraint:constraint-layout:1.0.2' 
testImplementation 'junit:junit:4.12' 
androidTestImplementation 'com.android.support.test:runner:1.0.1' 
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'} 

Dank

Verwandte Themen