0

I have a problem that's I can't run an app on my phone, it does not compile on AS.

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

I have tried replacing color with item but the error message is this one:

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'

This is my "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>

And this is my "colors.xml" file:

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

If you need anything else that I should let you guys know, let me know about it.

1 Answers1

0

Do you have USB Debugging enabled in your phone? and This is the build.gradle file.

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'}

Thanks

Pawan Lakhotia
  • 385
  • 1
  • 10