Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 934
Dorjsuren Ochir Avatar asked Dec 15 '22 01:12

Dorjsuren Ochir


2 Answers

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.

like image 106
Bourne Avatar answered Dec 30 '22 11:12

Bourne


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
like image 31
rciovati Avatar answered Dec 30 '22 11:12

rciovati