Android Studio: Failed to find: 'com.android.support:support-v4:19.1.0'

前端 未结 6 1607
醉酒成梦
醉酒成梦 2020-12-15 17:05

I want to build an app in Android Studio with the support library but I get the following error when adding the dependency for the support library:

Error:Fai         


        
相关标签:
6条回答
  • 2020-12-15 17:46

    Ok, found the problem. The Android support repository was missing. After installing and restarting Android Studio it worked.

    0 讨论(0)
  • 2020-12-15 17:51

    In my case the solution was as simple as running Build:Make Project. No amount of gradle syncing or clearing caches would do it. Of course, that required getting my project into a state where it would build successfully.

    0 讨论(0)
  • 2020-12-15 17:51

    Following the instruction here helped me. For whatever reason when I had to reinstall the latest version of android studio the initial download of the extras section android support library failed. I simply retried it. Followed the steps mentioned and verified it was added to the build.gradle file and did a rebuild project and good to go.

    http://developer.android.com/tools/support-library/setup.html

    0 讨论(0)
  • 2020-12-15 17:54

    If you are using Android Studio, then as an addition to changing the build.gradle file manually, you can also lookup the dependency via the library dependencies under the Project Structure menu item.

    Find where com.android.support is

    Double clicking that dependency will generate this line in build.gradle:

    dependencies {
        compile 'com.android.support:support-v13:+'
    }
    

    And also, if you are wondering what this library is about, it's described at the developer pages at developer.android.com; Support Library.

    0 讨论(0)
  • 2020-12-15 17:54

    In my case I needed to add Google Maven repository.

    It shows as part of the error in Android Studio and only needed to click on it to add itself.

    Then Gradle built the project on its own.

    0 讨论(0)
  • 2020-12-15 18:02

    My Android Studio version is 1.1. I select tools->Android->SDK Manager, check the Android Support Library then click Install packages, solved this issue.

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