CastVideos-android重复资源 [英] CastVideos-android Duplicate resources

查看:76
本文介绍了CastVideos-android重复资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花了很多时间将github上的 CastVideo-android示例转换为一个AndroidStudio项目。

I have spent quite a bit of time converting the CastVideo-android example on github into an AndroidStudio project.

我遇到了这个错误,

Execution failed for task ':chromecast-video:mergeDebugResources'.




/ Users / a / AndroidStudioProjects / ChromecastVideoTest / chromecast-video / src /main/res/values/styles_democast.xml:错误:重复的资源:/Users/a/AndroidStudioProjects/ChromecastVideoTest/chromecast-video/src/main/res/values/styles_democast.xml:style/TextAppearance.ShowcaseView.Detail.Light ,/Users/a/AndroidStudioProjects/ChromecastVideoTest/chromecast-video/src/main/res/values/styles_castvideo.xml:style/TextAppearance.ShowcaseView.Detail.Light

/Users/a/AndroidStudioProjects/ChromecastVideoTest/chromecast-video/src/main/res/values/styles_democast.xml: Error: Duplicate resources: /Users/a/AndroidStudioProjects/ChromecastVideoTest/chromecast-video/src/main/res/values/styles_democast.xml:style/TextAppearance.ShowcaseView.Detail.Light, /Users/a/AndroidStudioProjects/ChromecastVideoTest/chromecast-video/src/main/res/values/styles_castvideo.xml:style/TextAppearance.ShowcaseView.Detail.Light

根据对我在github存储库上提出的问题的回答 https://github.com/googlecast/CastVideos-android/issues/2 这可能是我的AndroidStudio设置存在的问题...感觉好像构建需要知道要处理的样式xml。 。

According to a response to the issue I raised on the github repo https://github.com/googlecast/CastVideos-android/issues/2 this might be a an issue with my AndroidStudio setup ... it feels like the build needs to know which styles xml to process ...

任何人都可以对此有所了解吗?

Can anyone shed some light on this?

还是可能建议一种更简便的方法ld googlecast android演示吗?

Or possibly suggest an easier way to build the googlecast android demos ?

非常感谢。

更新:

好吧,这不是一个答案,但是它可能会暂时帮助某个人,直到真正的答案出现为止……
最后,我只是手动注释掉了styles_democast.xml

Ok, it's not an answer but it might help someone temporarily until a real answer arrives... In the end I just manually commented out the duplicate definitions from styles_democast.xml

这是我更新的res / styles / styles_democast.xml

Here is my updated res/styles/styles_democast.xml




     Copyright (C) 2011 The Android Open Source Project
     Copyright (C) 2012 readyState Software Ltd

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<resources>

    <style name="Theme.Democast" parent="@style/Theme.AppCompat.Light.DarkActionBar">
        <item name="actionBarItemBackground">@drawable/selectable_background_democast</item>
        <item name="popupMenuStyle">@style/PopupMenu.Democast</item>
        <item name="dropDownListViewStyle">@style/DropDownListView.Democast</item>
        <item name="actionBarTabStyle">@style/ActionBarTabStyle.Democast</item>
        <item name="actionDropDownStyle">@style/DropDownNav.Democast</item>
        <item name="actionBarStyle">@style/ActionBar.Solid.Democast</item>
        <item name="actionModeBackground">@drawable/cab_background_top_democast</item>
        <item name="actionModeSplitBackground">@drawable/cab_background_bottom_democast</item>
        <item name="actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Democast</item>

        <!-- item name="android:titleTextStyle">@style/WhiteText</item -->


        <!-- Light.DarkActionBar specific -->
        <item name="actionBarWidgetTheme">@style/Theme.Democast.Widget</item>

        <!-- Seekbar -->
        <item name="android:seekBarStyle">@style/SeekBarAppTheme</item>
    </style>

    <!--
    style name="WhiteText" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
      <item name="android:textColor">@android:color/white</item>
    </style
    -->

    <style name="ActionBar.Solid.Democast" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
        <item name="background">@drawable/ab_solid_democast</item>
        <item name="backgroundStacked">@drawable/ab_stacked_solid_democast</item>
        <item name="backgroundSplit">@drawable/ab_bottom_solid_democast</item>
        <item name="progressBarStyle">@style/ProgressBar.Democast</item>
    </style>

    <style name="ActionBar.Transparent.Democast" parent="@style/Widget.AppCompat.ActionBar">
        <item name="background">@drawable/ab_transparent_democast</item>
        <item name="progressBarStyle">@style/ProgressBar.Democast</item>
    </style>

    <style name="PopupMenu.Democast" parent="@style/Widget.AppCompat.PopupMenu">
        <item name="android:popupBackground">@drawable/menu_dropdown_panel_democast</item>
    </style>

    <style name="DropDownListView.Democast" parent="@style/Widget.AppCompat.ListView.DropDown">
        <item name="android:listSelector">@drawable/selectable_background_democast</item>
    </style>

    <style name="ActionBarTabStyle.Democast" parent="@style/Widget.AppCompat.ActionBar.TabView">
        <item name="android:background">@drawable/tab_indicator_ab_democast</item>
    </style>

    <style name="DropDownNav.Democast" parent="@style/Widget.AppCompat.Spinner.DropDown.ActionBar">
        <item name="android:background">@drawable/spinner_background_ab_democast</item>
        <item name="android:popupBackground">@drawable/menu_dropdown_panel_democast</item>
        <item name="android:dropDownSelector">@drawable/selectable_background_democast</item>
    </style>

    <style name="ProgressBar.Democast" parent="@style/Widget.AppCompat.ProgressBar.Horizontal">
        <item name="android:progressDrawable">@drawable/progress_horizontal_democast</item>
    </style>

    <style name="ActionButton.CloseMode.Democast" parent="@style/Widget.AppCompat.ActionButton.CloseMode">
        <item name="android:background">@drawable/btn_cab_done_democast</item>
    </style>

    <!-- this style is only referenced in a Light.DarkActionBar based theme -->
    <style name="Theme.Democast.Widget" parent="@style/Theme.AppCompat">
        <item name="popupMenuStyle">@style/PopupMenu.Democast</item>
        <item name="dropDownListViewStyle">@style/DropDownListView.Democast</item>
    </style>
<!--
    <style name="SeekBarAppTheme" parent="android:Widget.SeekBar">
        <item name="android:progressDrawable">@drawable/apptheme_scrubber_progress_horizontal_holo_light</item>
        <item name="android:indeterminateDrawable">@drawable/apptheme_scrubber_progress_horizontal_holo_light</item>
        <item name="android:minHeight">13dip</item>
        <item name="android:maxHeight">13dip</item>
        <item name="android:thumb">@drawable/apptheme_scrubber_control_selector_holo_light</item>
        <item name="android:thumbOffset">16dip</item>
        <item name="android:paddingLeft">16dip</item>
        <item name="android:paddingRight">16dip</item>
    </style>
-->

    <!-- goes below ... item name="android:actionBarStyle">@style/ActionBar.Transparent.Democastoverlay</item -->
<!--
    <style name="Theme.DemocastOverlay" parent="@style/Theme.Democast">
        <item name="android:windowActionBarOverlay">true</item>
        <item name="windowActionBarOverlay">true</item>


    </style>
-->

    <!-- goes below .... item name="progressBarStyle">@style/ProgressBar.Democastoverlay</item -->
<!--
    <style name="ActionBar.Transparent.Democastoverlay" parent="@style/Widget.AppCompat.ActionBar">
            <item name="background">@drawable/ab_solid_democast</item>
            <item name="android:titleTextStyle">@style/WhiteText</item>

    </style>

    <style name="WhiteText" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
        <item name="android:textColor">@android:color/white</item>
    </style>

    <style name="CastDialog" parent="@android:style/Theme.Dialog">
        <item name="android:windowTitleStyle">@style/CastDialogWindowTitle</item>
    </style>
-->
    <!-- Show Case -->
    <!--
        <style name="ShowcaseButton">
            <item name="android:layout_width">wrap_content</item>
            <item name="android:layout_height">wrap_content</item>
            <item name="android:paddingTop">10dp</item>
            <item name="android:paddingBottom">15dp</item>
            <item name="android:paddingLeft">35dp</item>
            <item name="android:paddingRight">35dp</item>
            <item name="android:textStyle">bold</item>
            <item name="android:textColor">#000000</item>
            <item name="android:background">@color/yellow</item>
        </style>

        <style name="TextAppearance.ShowcaseView.Title" parent="android:style/TextAppearance.Large">
            <item name="android:textColor">#FFFFFF</item>
        </style>

        <style name="TextAppearance.ShowcaseView.Detail" parent="android:style/TextAppearance">
            <item name="android:textColor">#FFFFFF</item>
        </style>

        <style name="TextAppearance.ShowcaseView.Detail.Light">
            <item name="android:textColor">#666666</item>
            <item name="android:shadowColor">#FF0000</item>
            <item name="android:shadowRadius">0</item>
        </style>

        <style name="TextAppearance.ShowcaseView.Title.Light">
            <item name="android:shadowRadius">0</item>
        </style>
    -->
</resources>

更新2:

评论为在 CastCompanionLibrary-android编译时出现错误代码138

该帖子涉及让github.com/googlecast/CastCompanionLibrary-android进行编译的问题。 CastVideos-android需要CastCompanionLibrary(CCL)作为依赖项,因此那里的某些信息可能会帮助那些通常在Android Studio中难以构建android chromecast示例的人。

That post relates to issues with getting github.com/googlecast/CastCompanionLibrary-android to compile. The CastCompanionLibrary (CCL) is required as a dependency by CastVideos-android so some of the info there might help anyone who is generally running into difficultly building the android chromecast examples in Android Studio.

推荐答案

我想这是因为您在 styles_democast中都具有 TextAppearance.ShowcaseView.Detail.Light 。 xml styles_castvideo.xml

I guess it is because you have TextAppearance.ShowcaseView.Detail.Light in both styles_democast.xml and styles_castvideo.xml

这篇关于CastVideos-android重复资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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