任何人都可以获得在 android studio 中工作的 chromecast android 示例? [英] Anyone get the chromecast android examples working in android studio?

查看:34
本文介绍了任何人都可以获得在 android studio 中工作的 chromecast android 示例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试让这些加载时没有错误的过程中度过了一段糟糕的时光.支持框架失败或演员表 api.有人有可重复的方法吗?

I've had a terrible time trying to get these to load without errors. Either the support frameworks fail or the cast api. Anyone have a repeatable method?

github 示例说即将推出"以加载到 android studio.

The github examples say 'coming soon' for loading into android studio.

推荐答案

我还没有转换一个测试项目,但我已经能够创建一个适用于 chromecast 设备的新项目.

I haven't converted one of the test projects over but i have been able to create a new project that works with the chromecast device.

  1. 首先创建一个新项目.

  1. First create a new project.

在您的应用程序模块文件夹的根目录中创建一个 libs 文件夹

Create a libs folder in the root of your applications module folder

从 Chromecast SDK 下载中将 GoogleCastSdkAndroid.jar 文件复制到您的 libs 文件夹中.

From the Chromecast SDK download copy the GoogleCastSdkAndroid.jar file into your libs folder.

在您的应用程序模块 build.gradle 文件中,将构建脚本底部的依赖项更新为如下所示.

In your applications module build.gradle file update the dependencies at the bottom of the build script to read like the following.

dependencies {
    compile "com.android.support:appcompat-v7:18.0.+"
    compile "com.android.support:mediarouter-v7:18.0.+"
    compile files('libs/GoogleCastSdkAndroid.jar')
}

您应该很好地使用转换代码所需的所有外部依赖项.不要忘记打开 SDK 管理器并确保您安装并更新了 Android SDK 工具.

You should be good to go with the use of all the external dependencies required for the cast code. Don't forget to open up the SDK manager and make sure you have the Android SDK tools installed and updated.

为了对示例应用程序执行上述方法,您必须将它们转换为 gradle 构建系统.因为我是新手,所以我真的无法帮助你.

In order to do the above method with the sample apps you would have to convert them over to the gradle build system. As i'm new to this i can't really help you there.

祝你好运

这篇关于任何人都可以获得在 android studio 中工作的 chromecast android 示例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆