Failed to apply plugin Android Studio
Asked Answered
A

1

17

I am trying to import ExoPlayer library into my Android Studio project. I have tryed few times with several methods ( importing direct with GRADLE ), import as module, copy paste it, I get the same error:

Error:(15) A problem occurred evaluating project ':..:ExoPlayer:library'.
> Failed to apply plugin [id 'bintray-release']
   > Plugin with id 'bintray-release' not found.

In library gradle I found the apply plugin line:

apply plugin: 'bintray-release'

After Searching the library and apply it to dependencies I still got the error:

dependencies {
    compile 'com.novoda:bintray-release:0.2.10'
}

Any Ideea how can I solve this problem ?

Assailant answered 21/4, 2015 at 15:30 Comment(0)
G
28

It looks like gradle could not find this plugin in all specified repositories. ExoPlayer specifies buildscript repositories in the root project, so that's what you should do too.

In your root build.gradle make sure buildscript section contains jcenter() repository and 'andcom.novoda:bintray-release:0.2.7' classpath:

buildscript {
    repositories {
        ...... <- whatever you have now
        jcenter() <- make sure this one is there
    }
    dependencies {
        ...... <- whaterver you have now
        classpath 'com.novoda:bintray-release:0.2.7' <- make sure this one is there
    }
}
Gaseous answered 21/4, 2015 at 15:52 Comment(8)
Yeah, that was the problem, but is stupid, if I have in library gradle why should I have it in the main project gradle, however, good to know, thank you !Assailant
you'r right - this should be in library's gradle config file. Feel free to submit a merge request to ExoPlayer projectGaseous
in my case it still gives an error. after putting this line, what should I do?Amoreta
@PravinsinghWaghela maybe you are having another error? What error do you see?Gaseous
Sorry It worked, I think there was some unknown issue which got resolved. It working thanks.Amoreta
@PavelDudka please update the answer.. it`s not working.. after add this latest dependency only my problem solved classpath 'com.novoda:bintray-release:0.3.4'Truce
now i got "Error:(23, 0) Cannot change dependencies of configuration ':..:ExoPlayer:classpath' after it has been resolved." Could sb help me?Barnebas
Has been settled. I copied the lib in my project like stated here youtube.com/watch?v=7WBVsEYg1mgBarnebas

© 2022 - 2024 — McMap. All rights reserved.