【问题标题】:How to import libstreaming in Android Studio?如何在 Android Studio 中导入 libstreaming?
【发布时间】:2015-11-05 08:11:31
【问题描述】:

我是一位使用 Eclipse IDE 的老开发人员,现在我切换到了 Android Studio。我想使用下面的教程

Live Stream Library

我想将 libstreaming 库导入 Android Studio。

libstreaming

【问题讨论】:

  • 你是否在 gldle 文件中包含了“compile fileTree(dir: 'libs', include: '*.jar')”?
  • 它是一个完整的eclipse项目。我认为你提供的是 jar 文件
  • 嘿,你有什么解决办法吗?过去几天我也陷入了同样的问题。请帮助

标签: android android-studio android-studio-import


【解决方案1】:

Fritte's comment on this page 的帮助下,我将libstreaming 导入到我的Android Studio (v1.5.1) 项目中:

  • 创建一个新的 Android 项目
  • libstreaming 克隆到其他目录
  • 在您的新 Android 项目中,文件 > 新建 > 导入模块 > Path to libstreaming

然后,您可以通过将 compile project(':libstreaming') 添加到 build.gradle (Module:app) 文件的依赖项部分来将 libstreaming 作为依赖项添加到应用程序中。例如,我的现在看起来像这样:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile project(':libstreaming')
}

【讨论】:

  • 您好,我做了上面的步骤,但它不起作用 RtspClient、Session、SurfaceView 或标记为红色
  • 您还需要添加 libstreaming 作为模块依赖项。项目结构 -> 依赖项 -> 选择你的模块(我的是应用程序,你可能是一样的) -> 点击 + -> 模块依赖项 -> 选择 libstreaming
  • 这个库是否仍然适用于最新的android版本支持?
猜你喜欢
  • 2015-04-17
  • 2018-10-06
  • 2023-03-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-04-10
  • 2013-12-09
  • 2023-04-02
相关资源
最近更新 更多