Android Studio does not find com.android.support:support-v4:19.1.0

I imported one project in Android Studio , but I got an error:

Could not find com.android.support:support-v4:19.1.0.

Where can i find this file? I imported the project using Gradle .

I have Android Studio version 0.5.7 latest android sdk and java 1.7u55 .

+4
source share
7 answers

Just add this code to your build.gradle file

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

and click Tools → Android → Project synchronization with Gradle Files

Gradle will download the necessary files by itself.

+7
source

This does not work for me either. It works since 19.0.1 But if (I use gradle), I do this in my build.gradle file:

 repositories { def androidHome = System.getenv("ANDROID_HOME") mavenCentral() maven { url "$androidHome/extras/android/m2repository/" } } 

He finds an artifact.

+2
source

In the SDK manager, uninstall and reinstall the Android support package 19.1.

+2
source

I had the same problem in the morning. I found the Jar file that I need in /<MySdkFolder>/extras/android/support/ - it has several subfolders with different support libraries, so the last part of the path depends on which one you want to use.

I just copied this to the project lib folder. I am sure there is a more technical solution, but it worked for me.

+1
source

Right-click on the library and select the import as library option from the context menu for me.

0
source

The following theory works for me:

Android Studio has problems importing support library-v4: 19.1. + when it comes through a transitive dependency.

Decision. Adding support for v4 as a native dependency and excluding this library where it becomes transitive. then I could no longer see this import problem

0
source

Try to go

Project structure → Dependencies → Add: then select → Depdecies file

then select the desired library

0
source

Source: https://habr.com/ru/post/972024/


All Articles