Since the last update for android support libraries, I am having issues with importing LruCache. Eclipse, and now even android studio, keep saying that package android.suppo
If you're using Gradle
, I had to also add this line to the dependencies section of my inner build.gradle
, the file where you specify your minSdkVersion
and targetSdkVersion
:
dependencies {
compile "com.android.support:support-v4:19.0.+"
}
I believe the '19'
is supposed to be whatever your compileSdkVersion
. If I'm wrong, it will tell you what it's supposed to be.
In my case with Android Studio, this error appeared in the middle of a working project and refused to disappear despite much fooling around. I finally forced a Gradle Sync operation by adding a single space character to a Gradle file. The Gradle Sync fixed it instantly.
craned's answer:
dependencies {
compile "com.android.support:support-v4:19.0.+"
}
worked for me. But (in my case at least) the '19' should match the compileSdkVersion
In my case the problem was referencing the jar from sdk installation folder, copying the jar to project's libs folder adding to build path actually resolved the issue.
add dependency
dependencies { compile 'com.android.support:support-v4:+'}
Change Build Tool
dependencies { classpath 'com.android.tools.build:gradle:2.3.0'}
Worked for me.