1

I'm I only one who has this issue: in build.gradle of the application I define these:

android {
    compileSdkVersion 21
    buildToolsVersion "21.0.1"

    defaultConfig {
        applicationId "my.package.name"
        minSdkVersion 8
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
}

dependencies {
    // ...
    compile 'com.android.support:support-v4:21.0.0'
    compile 'com.android.support:appcompat-v7:21.0.0'
}

And in the end (after syncing project in android studio 0.8.9, updating to 0.8.13) I'm getting error that some resources aren't found though I've downloaded ALL SDK updates?

I'm not using any kind of google play services or etc. Currently the only thing I want is to get "materialized" ActionBar in my Nexus 5 with Lollipop image flashed.

Thanks a lot

Toochka
  • 894
  • 1
  • 9
  • 25
  • 1
    There is no `support-v7` artifact, so that `compile` directive is useless. Beyond that, if you cannot tell us what the exact errors are, it will be difficult for anyone to help you fix those exact errors. – CommonsWare Oct 21 '14 at 11:42
  • Sorry there was a typo. I wanted to say support-v4. – Toochka Oct 21 '14 at 11:48
  • The error is: No resource found that matches the given name 'Theme.Base.AppCompat.Light.DarkActionBar'. This error didn't occur whilst I was using API 19 – Toochka Oct 21 '14 at 11:48
  • In which values-folder does this error occur? – reVerse Oct 21 '14 at 12:45
  • Actually for me it was enough to remove `support-v4` `compile` directive – Toochka Oct 22 '14 at 12:54

3 Answers3

1

I had this issue in Eclipse where my compile target was not set to api 21. As you have set this I can imagine that your gradle setup does not include the resources. Maybe that helps: How do I add a library (android-support-v7-appcompat) in IntelliJ IDEA

Community
  • 1
  • 1
Carsten
  • 806
  • 5
  • 6
0

Yeah I had the same issue in eclipse and what I had to do was:
1. change the android appcompat-v7 project.properties property "target=android-21"
2. change your project project.properties property "target=android-21" too.

jacatanog
  • 77
  • 8
0

I was facing the same issue. There are 2 things you have to do make sure you are using build tool 21.1.1 and please check your build.gradle file and change the gradle dependency to

classpath 'com.android.tools.build:gradle:0.12.1'

from

classpath 'com.android.tools.build:gradle:0.12.+'

Make sure your sdk is updated to version 21 and in your gradle compileSdkVersion is 21

I hope this will work for you.

falsarella
  • 12,217
  • 9
  • 69
  • 115
Ankit
  • 1,916
  • 2
  • 20
  • 33