Failed to import ijkplayer dependency

We use ijkplayer in two ways, one is to directly import the ijkplayer dependency, and the other is to download the source code of ijkplayer and compile it, and then import it in your own project.

Because importing dependencies is more convenient to use, I started to use importing ijkplayer dependencies.
I added dependencies on github according to the following content, but the addition was not successful.
insert image description here
The import fails and gives the following error

A problem occurred evaluating project ‘:app’.Build was configured to prefer settings repositories over project repositories but repository ‘BintrayJCenter’ was added by build file ‘app\build.gradle’

This means that our build configuration should be written to the settings repository setting.gradle, not the project repository build.gradle,
I tried again.
insert image description here
Compilation passed. Dependency imported successfully.

reason:

My version of AS is Chipmunk.
Android's latest project compilation dependency configuration has been migrated from build.gradle (project level) to settings.gradle.
If it is an old version, you can still add project compilation configuration in build, gradle,

Guess you like

Origin blog.csdn.net/qq_43867812/article/details/127833178