在IONIC Framework中使用Cordova的Exo播放器

时间:2017-10-25 12:47:42

标签: cordova ionic-framework exoplayer

在处理Media Streaming时遇到了一些困难,我有Radio Streaming Links,我尝试使用Cordova的Media Streaming,但它似乎有一些限制,比如只在FullScreen中工作,我开始知道一个名字插件&# 39; Exo Player'但在实施过程中,它无法构建/运行android。 任何人都可以帮助我或者告诉我它的替代品。

运行cordova build android

时会发生以下错误

错误:cmd:命令失败,退出代码1错误输出: FAILURE:构建因异常而失败。

  • 出了什么问题: 配置根项目' android'。

    时出现问题
      

    无法解析配置':_ debugApkCopy'的所有依赖项。   找不到com.android.support:support-annotations:25.4.0。    要求:        :android:unspecified> com.google.android.exoplayer:exoplayer:r2.5.1> com.google.android.exoplayer:exoplayer核心:r2.5.1        :android:unspecified> com.google.android.exoplayer:exoplayer:r2.5.1> com.google.android.exoplayer:exoplayer破折号:r2.5.1        :android:unspecified> com.google.android.exoplayer:exoplayer:r2.5.1> com.google.android.exoplayer:exoplayer-HLS:r2.5.1        :android:unspecified> com.google.android.exoplayer:exoplayer:r2.5.1> com.google.android.exoplayer:exoplayer-smoothstreaming:r2.5.1        :android:unspecified> com.google.android.exoplayer:exoplayer:r2.5.1> com.google.android.exoplayer:exoplayer的UI:r2.5.1   找不到com.android.support:support-core-utils:25.4.0。    要求:        :android:unspecified> com.google.android.exoplayer:exoplayer:r2.5.1> com.google.android.exoplayer:exoplayer划线:r2.5.1

  • 尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。

1 个答案:

答案 0 :(得分:0)

在build.gradle文件中添加以下内容(以粗体突出显示。)

allprojects {
    repositories {
        mavenCentral();
        jcenter();
        **maven { url 'https://maven.google.com' }**
    }
}