Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not resolve support-v4 #6

Open
ghost opened this issue Jul 22, 2014 · 9 comments
Open

could not resolve support-v4 #6

ghost opened this issue Jul 22, 2014 · 9 comments

Comments

@ghost
Copy link

ghost commented Jul 22, 2014

When including version 1.0.3 as a dependency from maven central using gradle,
the build fails due to the following error:
"Could not resolve all dependencies"
"Could not find com.google.android:support-v4:r13"

and it seems that the latest version of support-v4 on maven central is actually r7..

@pkliang
Copy link

pkliang commented Sep 27, 2014

compile ('com.fizz-buzz:fb-android-dagger:1.0.3'){
exclude group: 'com.google.android', module: 'support-v4'
}

@enantiomer2000
Copy link

I am also having a similar issue. I get the message:

A problem occurred configuring project ':app'. Artifact 'compatibility-v4.jar (android.support:compatibility-v4:21.0.1)' not found.
Searched in the following locations:
https://jitpack.io/android/support/compatibility-v4/21.0.1/compatibility-v4-21.0.1.jar

I tried excluding the group like pkliang said but it doesn't help.

@adennie
Copy link
Owner

adennie commented Mar 30, 2015

are you using the maven android SDK deployer, as described in the readme?

@enantiomer2000
Copy link

I am pretty new to android and am using gradle with compile com.fizz-buzz:fb-android-dagger:1.0.6'. I don't really know what I need to add to my build.gradle. The readme really only says that the project uses the Maven Android SDK Deployer, not what you need to do with it. Do I need to do a mvn install on the SDK Deployer source to build the jar file? I tried that and got some errors. I wasn't sure if it was worth looking into them if that step wasn't needed.

@adennie
Copy link
Owner

adennie commented Mar 30, 2015

The link to the maven android SDK deployer provides instructions (pretty lengthy ones at that, but you were on the right track with "mvn install"). By default, it tries to install pretty much everything available in the SDK. If you haven't installed everything via the SDK Manager, then it will trip over things that are missing. You can follow the instructions to only install certain parts, but I confess I find that more tedious and error-prone than just making sure I have everything installed first using SDK Manager, and then doing an "mvn install" on the maven android SDK deployer.

That being said, fb-android-dagger only depends on compatibility-v4, so technically that's all you need to have installed in your maven repo.

@enantiomer2000
Copy link

adennie, I installed everything via the SDK manager and was able to mvn install the Android SDK Delpoyer successfully. What jar file should i include in my libs folder? compatibility-v4-21.0.1.jar? That is the one that gradle is complaining about. Thanks.

@adennie
Copy link
Owner

adennie commented Mar 31, 2015

I don't think you should have to copy it into your libs folder. Have you
done an "mvn install" on fb-android-dagger? If so, then it should be in
your local maven repo (along with v4 compatibility lib). If you're
specifying a dependency on fb-android-dagger in your gradle build file,
it should find it in your maven repo, and also resolve its dependency on
the v4 compatibility lib.

enantiomer2000 wrote:

adennie, I installed everything via the SDK manager and was able to
mvn install the Android SDK Delpoyer successfully. What jar file
should i include in my libs folder? compatibility-v4-21.0.1.jar? That
is the one that gradle is complaining about. Thanks.


Reply to this email directly or view it on GitHub
#6 (comment).

@enantiomer2000
Copy link

adennie, I am able to build it from the latest github source. This source version is 1.0.7-SNAPSHOT and seems to be dependent on compatibility-v4 version 22.0.0 rather than 21.0.1. My system has version 22. On the other hand, 1.0.7 doesn't seem to be officially released yet so I guess I can't link to it via my gradle.build file. I will try manually adding the SNAPSHOT jar file and the compatibility-v4-22.0.0.jar file to my libs folder and see if that works...

@adennie
Copy link
Owner

adennie commented Mar 31, 2015

to build the 1.0.6 version, just checkout that tag first, and then do
the "mvn install".

enantiomer2000 wrote:

adennie, I am able to build it from the latest github source. This
source version is 1.0.7-SNAPSHOT and seems to be dependent on
compatibility-v4 version 22.0.0 rather than 21.0.1. My system has
version 22. On the other hand, 1.0.7 doesn't seem to be officially
released yet so I guess I can't link to it via my gradle.build file. I
will try manually adding the SNAPSHOT jar file and the
compatibility-v4-22.0.0.jar file to my libs folder and see if that
works...


Reply to this email directly or view it on GitHub
#6 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants