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.support.v4.util does not exist.
I am using actionbarsherlock and it has included android support v4 and shows no errors. My application was working fine before this last SDK update. What has changed? How do I fix this?
Here is the error that shows:
java: /Users/amit/App/src/com/app/EMCache.java:5: package android.support.v4.util does not exist
java: /Users/amit/App/src/com/app/EMCache.java:9: cannot find symbol
symbol : class LruCache
location: class com.app.EMCache
java: /Users/amit/App/src/com/app/EMCache.java:20: cannot find symbol
symbol : class LruCache
location: class com.app.EMCache
In my case I was porting an Android Googlemaps app API1 to API2, and after many hours I realized I was not adding
to External Libraries..
Hope this helps
If you're using
Gradle
, I had to also add this line to the dependencies section of my innerbuild.gradle
, the file where you specify yourminSdkVersion
andtargetSdkVersion
:I believe the
'19'
is supposed to be whatever yourcompileSdkVersion
. If I'm wrong, it will tell you what it's supposed to be.Worked for me.