Android Studio, Gradle, CastVideos-android simple app error: “Configuration with name 'default' not found”

StackOverflow https://stackoverflow.com//questions/22067466

Question

I have downloaded this application from here https://github.com/googlecast/CastVideos-android.

But the message i see is "Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly" as shown in snapshot below.

I choose to Gradle Settings "Use default gradle wrapper (recommended)".

Build error: Gradle 'CastVideos-android-master' project refresh failed: Configuration with name 'default' not found. Gradle settings

Android Studio 0.4.6

How to resolve this problem?

How solve this problem?

Was it helpful?

Solution

Not sure if this should be an answer or a comment but, is your project structured in this way?

File Structure

|-- CastVideos-android
|   +-- build.gradle
|-- CastCompanionLibrary
|   +-- build.gradle

OTHER TIPS

At this point, Android Studio has already evolved to 0.5.9. Yippy!

To answer your question though, I ran into the same problem at first, but was able to quickly fix it when going over the documentation and seeing that the CastCompanionLibrary-android file is a dependency for this app. You can download here at https://github.com/googlecast/CastCompanionLibrary-android

If you download and unzip it yourself, you need to make sure the name matches what you refer to in the build.gradle file, for example:

I used: compile project(':..:CastCompanionLibrary')

So I took off the "android-master" part of the name and note I have it at the same directory level as the project, similar to what rciovati refers to.

Then in settings.gradle, same thing: include '..:CastCompanionLibrary'

Be sure the name is consistent.

That should clear this issue up. Seems like you figured it out, but to help others, figured I'd note these nuances of solving this.

Just make sure to follow the setup instructions on the GoogleCast GitHub repo:

https://github.com/googlecast/CastVideos-android#setup-instructions

In particular:

$ git clone https://github.com/googlecast/CastVideos-android.git CastVideos

$ git clone https://github.com/googlecast/CastCompanionLibrary-android.git CastCompanionLibrary

$ cd CastVideos

$ ./gradlew build

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top