Reputation: 14227
I have imported one project into Android Studio
but I got the error:
Could not find com.android.support:support-v4:19.1.0.
Where could I find this file? I have imported the project using Gradle
.
I have the Android Studio version 0.5.7
the last android sdk and java 1.7u55
.
Upvotes: 4
Views: 17343
Reputation: 53
I had a similar problem. This line to build.gradle works --> implementation 'com.android.support:support v4:28.0.0'
Upvotes: 0
Reputation: 6033
This artifact is available on google maven repository. So need to add following in the build.gradle:
allprojects {
repositories {
mavenLocal()
google()
}
}
Upvotes: 0
Reputation: 1
Try to go
Project Structure -> Dependencies -> Add : then select -> File dependecies
then select the proper library
Upvotes: 0
Reputation: 21
From the SDK Manager, delete and re-install the Android Support Library 19.1 package.
Upvotes: 2
Reputation: 367
Right clicking on the library and select the import as library option from the context menu works for me.
Upvotes: 0
Reputation: 7438
Following theory works at me:
Android Studio has problems importing support-v4:19.1.+ library when it comes through a transitive dependency.
Solution Adding support-v4 as own dependency and exclude this lib where it comes transitive. then i could not more see this import issue
Upvotes: 0
Reputation: 1232
It does not work for me either. It works with 19.0.1 But if (I use gradle) I do this in my build.gradle:
repositories {
def androidHome = System.getenv("ANDROID_HOME")
mavenCentral()
maven {
url "$androidHome/extras/android/m2repository/"
}
}
It finds the artifact.
Upvotes: 2
Reputation:
Just add this code to you build.gradle file
dependencies {
compile 'com.android.support:support-v4:19.+'
}
and press Tools -> Android -> Sync Project with Gradle Files
Gradle will download necessary files by himself
Upvotes: 8
Reputation: 1158
I had this same problem with morning. I found the Jar file that I needed in /<MySdkFolder>/extras/android/support/
- in there are some sub folders with the different support libraries in them, so the last part of the path depends on which one that you want to use.
I just copied this into the lib folder of the project. I'm sure there is a more technical solution but it worked for me.
Upvotes: 1