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

Build failed - missing com.android.support:support-v4:19.1.+. #1

Closed
keithkml opened this issue Jul 28, 2014 · 7 comments
Closed

Build failed - missing com.android.support:support-v4:19.1.+. #1

keithkml opened this issue Jul 28, 2014 · 7 comments

Comments

@keithkml
Copy link

FAILURE: Build failed with an exception.

What went wrong:
A problem occurred configuring root project 'AndroidBeaconLibrary'.
Could not resolve all dependencies for configuration ':_debugTestCompile'.
Could not find any version that matches com.android.support:support-v4:19.1.+.
Required by:
org.altbeacon:AndroidBeaconLibrary:2.0-beta1-2-gfce0d2a > com.squareup:fest-android:1.0.8

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 3.11 secs

@keithkml
Copy link
Author

This is from a fresh checkout and fresh build with Gradle 1.10

@davidgyoung
Copy link
Member

Fixing this should be as simple as updating your Android Support Library using the SDK manager under Android Studio. You probably have a slightly older version of the support library installed.

See here: http://stackoverflow.com/questions/19621941/android-studio-could-not-find-any-version-that-matches-com-android-supportappco

@keithkml
Copy link
Author

It looks like gradle is installing its own version of the SDK to build this library. I've never used gradle and don't know how it works.

$ ~/Downloads/gradle-1.10/bin/gradle test
Build tools 19.0.3 missing. Downloading...
Platform tools missing. Downloading...
Compilation API android-19 missing. Downloading...

It looks like it installed it into ~/.android-sdk and it didn't even try to install the ASL. I ran ~/.android-sdk/tools/android and installed the ASL, restarted the SDK manager, upgraded the platform and the ASL.

Now SDK Manager says I have ASL 20 installed, but the build still gives the same error I reported originally.

@keithkml
Copy link
Author

I hunted around the Internet and found this:

~/.android-sdk/tools/android update sdk --no-ui --filter extra

After running that, it seems to work. Not sure how or why that helped

@davidgyoung
Copy link
Member

Try using the gradle wrapper and running each of the targets below to see if they make a difference.

./gradlew build

./gradlew release

@davidgyoung
Copy link
Member

OK, cool. Glad the SDK update worked in the end -- not sure why you needed to do it with the command line.

@ento
Copy link
Contributor

ento commented Jul 30, 2014

I've managed to get it work by specifying ANDROID_HOME to point at my installation of Android Studio:

ANDROID_HOME=/Applications/Android\ Studio.app/sdk/ ./gradlew release

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