-1

D:\Documents\Learn\Testing\MyApplication\app\build\intermediates\res\merged\debug\values\values.xml

Error:(7) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.

I installed Android Studio 2.1 and was trying to learn Mockito.

However it was not creating the Mock objects because it didn't recognize the @Mock annotation (compile errors).

So I installed Android Support Library 33.0. Now I get error: No resource found that matches the given name Theme.AppCompat.Light.DarkActionBar

I updated Android Studio to 2.1.2 but no difference.

Any help appreciated.

Information:Gradle tasks [:app:generateDebugSources, :app:prepareDebugUnitTestDependencies, :app:mockableAndroidJar,
 :app:compileDebugUnitTestSources]


 :app:preBuild UP-TO-DATE
 :app:preDebugBuild UP-TO-DATE

 :app:checkDebugManifest

 :app:prepareDebugDependencies

 :app:compileDebugAidl UP-TO-DATE

 :app:compileDebugRenderscript UP-TO-DATE

 :app:generateDebugBuildConfig UP-TO-DATE

 :app:mergeDebugShaders UP-TO-DATE

 :app:compileDebugShaders UP-TO-DATE

 :app:generateDebugAssets UP-TO-DATE

 :app:mergeDebugAssets UP-TO-DATE

 :app:generateDebugResValues UP-TO-DATE

 :app:generateDebugResources UP-TO-DATE

 :app:mergeDebugResources UP-TO-DATE

 :app:processDebugManifest UP-TO-DATE

 :app:processDebugResources

 D:\Documents\Learn\Testing\MyApplication\app\build\intermediates\res\merged\debug\values\values.xml

 Error:(7) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.

 D:\Documents\Learn\Testing\MyApplication\app\src\main\res\values\styles.xml

 Error:(4, 5) No resource found that matches the given name: attr 'colorAccent'.

 Error:(4, 5) No resource found that matches the given name: attr 'colorPrimary'.

 Error:(4, 5) No resource found that matches the given name: attr 'colorPrimaryDark'.

 Error:Execution failed for task ':app:processDebugResources'.

 > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 

 'D:\Android\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1

 Information:BUILD FAILED

 Information:Total time: 6.239 secs

 Information:5 errors

 Information:0 warnings

 Information:See complete output in console

My gradle file is here:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "me.com.myapplication"
        minSdkVersion 22
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile 'com.android.support.test:runner:0.4'
    testCompile 'junit:junit:4.12'
    testCompile 'org.mockito:mockito-core:1.10.19'
}
likejudo
  • 3,396
  • 6
  • 52
  • 107

1 Answers1

0

I found this post

and changed the Theme in the manifest to

<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
</style>

that fixed it!

Community
  • 1
  • 1
likejudo
  • 3,396
  • 6
  • 52
  • 107