package android.support.v4.util does not exist

前端 未结 11 819
情书的邮戳
情书的邮戳 2020-12-24 13:26

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

相关标签:
11条回答
  • 2020-12-24 13:50

    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.

    0 讨论(0)
  • 2020-12-24 13:53

    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.

    0 讨论(0)
  • 2020-12-24 13:55

    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

    0 讨论(0)
  • 2020-12-24 13:56

    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.

    0 讨论(0)
  • 2020-12-24 13:59

    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.

    0 讨论(0)
提交回复
热议问题