任何人得到的Chromecast的Andr​​oid例子机器人工作室工作? [英] Anyone get the chromecast android examples working in android studio?

查看:174
本文介绍了任何人得到的Chromecast的Andr​​oid例子机器人工作室工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可怕的时间试图让这些为无差错加载。无论是支持框架失败或投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的工作室。

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')
}


您应该是好去与使用的铸铁code要求所有的外部依赖。不要忘了打开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.

好运气

这篇关于任何人得到的Chromecast的Andr​​oid例子机器人工作室工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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